Skip to content

CLI package for testing websites & checking their contents

License

Notifications You must be signed in to change notification settings

Gerrproger/ringmaster

Repository files navigation

Ringmaster


CLI package for testing websites & checking their contents.

Usage

Install package: npm install ringmaster -g | yarn global add ringmaster.
Run ringmaster from CLI.

Or, you can download and launch it directly from the Releases.
Do not forget to make the file executable: chmod +x ringmaster-macos-arm64.

It will search your config files in the folder ./_tests by default.
You can pass desired folders as arguments: ringmaster ./tests-folder ~/another-folder.
Or, you can pass folders as --dir option: ringmaster --dir dir1 --dir dir2.

Result files are exported to the ./_results folder by default.
You can change it with --output option: ringmaster --no-output.

Options

You can use options with this library, for example: ringmaster --sample.

Supported options:

  • --help - displays help for commands.
  • --version - displays package version.
  • --interactive - launches package in interactive mode.
  • --sample - adds sample directory to dirs.

And other options from the CLI options list (that will override options of all included test suits).

Configuration

The library uses JSON schemas to configure tests cases.
You need to always have a config.json file with the main test suit Configuration.

For test cases, you need a separate config file for each test type.

Supported test types:

You can configure actions to perform before the test check through the Before section.

Example

Check out sample-test folder.

Development & Testing

Installation

Clone repo: git clone https://github.com/Gerrproger/ringmaster.git.
Install dependencies: npm install | yarn install.
Run command: npm run start | yarn start.
Pass arguments casually: npm run start -- --sample | yarn start --sample.

Or you can link package: npm link.
Then just use command ringmaster from CLI.
To uninstall the linked package, run: npm uninstall -g ringmaster.

Building

To build executables and schema docs, run: npm run build | yarn build.

Testing

To run tests, use: npm run test | yarn test.

TODO

  • Add new test types (visual via screenshots, content comparison).
  • Make it possible to declare configs directly as objects and not only from files.
  • Add exported config file formats and not only JSON (config.js/.mjs/.cjs).
  • Write more tests with coverage.