The testrail-report-wrapper enables in a very simple way to automatically import results to Testrail, using the reports of any test automation framework
Because Cucumber reports doesn’t have the result for each outline scenario, please use the following project: https://gist.github.com/blt04/9866357 Please notice that you need to generate the report with a new command line:
$ cucumber --format Cucumber::Formatter::JsonExpanded --out results.json features
- Cucumber
- Download the software project:
- If you are using cucumber with Scenario Outline, download the following file from (https://gist.github.com/blt04/9866357) and place it into features/support
In a few steps:
- Create the Results object - Load any file into memory.
- Create the Wrapper object - Test Plan name and Project name is needed.
- Create a run for each configuration needed, indicating the parser you need and the configuration.
- Create the Plan entry
- Set the results
> results_iPadMini_phy_IOS8 = TestRailReporterWrapper::Results.new('../iPadMini_phy_IOS8.json')
> results_iPad2_sim_IOS7 = TestRailReporterWrapper::Results.new('../iPhone5s_phy_IOS7.json')
> support = TestRailReporterWrapper::ReporterWrapper.new('Automatic Tests', 'MY_PROJECT')
> support.delete_plan_entry('build 636')
> support.add_run(results_iPadMini_phy_IOS8.cucumber_parse, ['iPad mini', 'Physical', 'IOS 8'])
> support.add_run(results_iPad2_sim_IOS7.cucumber_parse, ['iPad 2', 'Physical', 'IOS 7'])
> support.create_plan_entry('build 636')
> support.set_results