yaml-scene

1.1.25 • Public • Published

YAML Scene

It's a platform to do everything with only yaml scenario files.
Because it's a platform, so you can easy to create extensions by yourself or use extensions which is shared by others.

Features

  1. Split a huge scenario file to many small files which make easy to run in a big project
  2. Flexible to use, easy to extends, customize for specific project
  3. Easy to install and reuse extensions via npm registry or create a extension by yourself
  4. Easy to customize or create new extensions and share them to everybody or reused in projects
  5. Support encrypt a scenario file and run the encrypted scenario file
  6. Provide docker image to run it without installation
  7. Support run a scenario file, load extensions from both local files and remote files (http(s)
  8. Auto generate a json schema for suggestion and validation

Installation

Install via npm or yarn

  npm install -g yaml-scene   # yarn global add yaml-scene

How to run

  1. Create a scenario file with the below content
# Make a http request to http://localhost:8000/index.html
- yas-http/Get:
    baseURL: http://localhost:8000
    url: /index.html
    var: responseContent

# Print response content to console
- Echo: ${responseContent}
  1. Run the scenario
  yas $YAML_SCENE_FILE $PASSWORD
  • $YAML_SCENE_FILE: Path to scenario file
  • $PASSWORD: Password to run encrypted scenario file which contains property "password" in scenario file content.

Docker image

docker pull doanthuanthanh88/yaml-scene:latest

Run via docker

  docker run --rm -it doanthuanthanh88/yaml-scene $YAML_SCENE_FILE $PASSWORD

Extensions

  1. yas-http: Manage http(s) request, mocking api server, create testcases, generate to document...
  2. yas-grpc: Manage gRPC request, mocking gRPC server, create testcases, generate to document...
  3. yas-sequence-diagram: Generate to sequence diagram, flow diagram base on comment in code
  4. yas-redis: A redis client

You can build a extension by yourself


Guideline document

Sharing


How to create a yaml scene file

Please follow wiki pages to create a scene file for your self.


Examples

Please go to here to see examples


Create a new extension

Please clone Extension template project which includes examples, commands to unit test, build, document...

Or you can write a simple extension js file


CLI

  1. Run a scenario my_scenario.yas.yaml
  1. Install new extensions
  yas add yas-http yas-grpc
  1. Upgrade extensions
  yas up yas-http yas-grpc
  1. Uninstall extensions
  yas rm yas-http yas-grpc
  1. Show version
  yas -v
  1. Show help content
  yas -h

More information

Goodluck and fun :)

Package Sidebar

Install

npm i yaml-scene

Weekly Downloads

0

Version

1.1.25

License

MIT

Unpacked Size

483 kB

Total Files

381

Last publish

Collaborators

  • doanthuanthanh88