billylam / wdio-wdiov5testrail-reporter

https://www.npmjs.com/package/wdio-wdiov5testrail-reporter
MIT License
6 stars 8 forks source link

Adding support of filtering cases for adding in TestRun #15

Closed AliakseiBulat closed 2 years ago

AliakseiBulat commented 2 years ago

Current implementation of library supports only creation of test runs for all tests in project and suite. There were no possibility for apply more filters. With this PR you will be able to create smaller TestRuns based on custom filters: only hight priority cases, only specific test types and etc. Even if you add a custom field, e.g. Responsible Team, it will be possible to use this custom value in the filter.

Example:

reporters: [
    ['wdiov5testrail', {
      domain: 'your domain',
      username: 'your testrail username',
      password: 'your testrail password (or api key)',
      projectId: your testrail project id,
      casesFieldFilter: {'priority_id': 1, 'type_id': 2}
    }],
  ],

NOTE: if you use multiple key:value pairs in the filter object it will work as AND conditions.

AliakseiBulat commented 2 years ago

Found an issue which need to be addressed

AliakseiBulat commented 2 years ago

Issue is fixed! Reopening the PR.

AliakseiBulat commented 2 years ago

@billylam please review.