0.5.0 • Published 4 years ago

hermione-test-filter v0.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

hermione-test-filter

Plugin for hermione to filter tests specified in json-file.

Install

npm install hermione-test-filter

Configuration

  • enabled Boolean (optional, false by default) - enable/disable the plugin.
  • inputFile String (optional, hermione-filter.json by default) - path to file with tests to run.
  • filterTestsByCode String|RegExp|Function (optional, null by default) - filtering tests by their code and hooks.

Usage

With inputFile

  • Require plugin in your hermione config file:
plugins: {
    'hermione-test-filter': {
        enabled: true,
        inputFile: 'some/file.json'
    }
}
  • Input file format:
[
    {
        "fullTitle": "some-title",
        "browserId": "some-browser"
    }
]

With filterTestsByCode

Works only with hermione@>=3.5.0.

  • Use plugin for filtering tests by their code:
plugins: {
    'hermione-test-filter': {
        enabled: true,
        // run all tests with assertView
        filterTestsByCode: 'assertView',
        // or
        filterTestsByCode: (testSrc) => {
            return testSrc.includes('assertView');
        }
    }
}
  • Use plugin for filtering tests by their code from input file:
plugins: {
    'hermione-test-filter': {
        enabled: true,
        // run all tests with assertView from input file
        inputFile: 'some/file.json',
        filterTestsByCode: 'assertView'
    }
}
  • Run plugin with cli option for filtering tests by their code:
npx hermione --filter-tests-by-code assertView
0.5.0

4 years ago

0.4.0

4 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago