Socket
Socket
Sign inDemoInstall

manual-yaml

Package Overview
Dependencies
11
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    manual-yaml

manual-yaml is a standardised method for generating maunal tests. The tool will then convert manual tests to e2e tests automatically for you.


Version published
Weekly downloads
16
increased by166.67%
Maintainers
1
Install size
31.0 MB
Created
Weekly downloads
 

Readme

Source

manual-yaml

Table of Contents generated with DocToc

What is manual-yaml

An npm package to normalise manual test writing into yaml files. The normalised form of the manual tests can then be automatically used to generate all the required stubs for e2e testing.

How to install

Installed globally to your local machine:

npm i -g manual-yaml

Available manual-yaml commands

  Usage: index [options]

  Options:

    -v, --version                    output the version number
    -S, --skeletonGenerate           Generate a skeleton structure of yml manual tests within the current folder
    -s, --ymlSuiteGenerate [string]  Generate a single yml test suite to the current dir. Pass the name of test as a string eg tests/contact-us/sendMsg.yml
    -e, --e2eGenerate                Generate e2e stubs for a directory the command is used within, ie "./"
    -t, --templates [string]         If passed should be the path to custom templates for manual-yaml
    -f, --format [string]            Defaults to nightwatchjs if not passed. The string should match the name of the tpl minus the .njk file ext. To use an alternate e2e output please use the custom templates directive. Alternatively please send a pull request to merge in your favourite e2e test env. tpl.
    -x, --excel                      Generates a spreadsheet manual testing session based on the Yaml tests
    -h, --help                       output usage information

Starting a new project

  1. Navigate to the root of your manual testing folder.
  2. Insert a manual-yaml skeleton to quickly get started:
manual-yaml -S
  1. When asked to create the skeleton yml folder press 'y' then 'enter'

NB: If there is already a folder named 'yml' then manual-yaml will stop and let you know.

Adding a new test suit to an existing project

  1. Navigate to the root of your manual testing folder
  2. Insert a manual-yaml test suit quickly by running (replacing the path with your own):
manual-yaml -s yml/tests/contact-us/sendMsg.yml

NB: If this test already exists it will stop and let you know.

NB2: If you pass the -t to override the templates directory you have the option to use your own yml tpl (see below).

Excel sheet creation from yml tests

(rough and ready solution at present)

You can generate a spreadsheet from the yaml files to assist in keeping track of the progress of the tests.

  1. Navigate to the root folder of your manual yaml folder
  2. manual-yaml -x

Converting a yml stack of manual tests to e2e test stubs

  1. Navigate to the root of your manual testing folder
  2. Run the following command to create your e2e stubs
manual-yaml -e
  1. manual-yaml will automatically convert all the yml to files to nightwatchjs e2e test stubs

NB: It will not overwrite any tests already found.

Changing the default e2e template

By default manual-yaml will use a built in template for nightwatchjs to generate the e2e stubs. You can instruct manual-yaml to use another template by passing its name minus the .njk extension:

manual-yaml -e -f someothertestrig

Currently there is only 1 built in template and this is for nightwatchjs, to use manual-yaml with another test runner, please use the -f directive in combination with the -t custom templates (documented below) eg: -f testcafe -t /home/me/manual-yaml-templates will instruct manual-yaml to use the testcafe test runner and the template is in the custom templates directory.

e2e conversion custom templates

Using the --templates or -t for short directive you are able to overwrite the directory for the templates and thus use your own.

manual-yaml -e -t /home/me/manual-yaml-templates

The provided custom tpl directory should contain at least 1 folder with the tests, eg:

test-suites/
------------ karma.njk
------------ nightwatchjs.njk
------------ testcafe.njk

You can then switch between your own custom tpls with ease (don't forget the default is nightwatchjs):

manual-yaml -e -f testcafe -t /home/me/manual-yaml-templates

FAQs

Last updated on 09 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc