0.0.2 • Published 4 years ago
hermione-sequential-tests-run v0.0.2
hermione-sequential-tests-run
Plugin for hermione to run selected tests in sequence.
You can read more about hermione plugins here.
Installation
npm install hermione-sequential-tests-runUsage
Configuration
Plugin has following configuration:
- enabled (optional)
Boolean– enable/disable the plugin; by default plugin is enabled - commandName (required)
String- command name which will be added to hermione context and used in tests before test or suite declaration to run test sequentially in passed browser. By default the command is called -sequentially.
Also there is ability to override plugin parameters by CLI options or environment variables
(see configparser).
Use hermione_sequential_tests_run prefix for the environment variables and --hermione-sequential-tests-run for the cli options.
Hermione usage
Add plugin to your hermione config file:
module.exports = {
// ...
system: {
plugins: {
'hermione-sequential-tests-run': {
enabled: true,
browsers: /ie/,
commandName: 'sequentially' // as default (can be omitted)
}
}
},
//...
}Example:
describe('suite1', () => {
it('test1', function() {...});
it('test2', function() {...});
hermione.sequentially.in('chrome');
it('test3', function() {...});
hermione.sequentially.in(/.*/);
describe('suite2', () => {
it('test4', function() {...});
it('test5', function() {...});
});
})Suppose we have two browsers: chrome and firefox, so as a result:
- will be run in parallel:
- tests
suite1 test1andsuite1 test2in chrome and firefox - test
suite1 test3only in firefox
- tests
- will be run sequentially:
- test
suite1 test3in chrome - tests
suite2 test4andsuite2 test5in chrome and firefox
- test
Testing
Run eslint codestyle verification
npm run lint0.0.2
4 years ago