Unable to generate cucumber reports in jenkins. net.masterthought.cucumber.ValidationException: None report file was added

后端 未结 4 715
囚心锁ツ
囚心锁ツ 2021-01-16 06:01

I am using jenkins to run jobs that uses maven with cucumber . my jobs are running succesfully. I have also managed the plugin Cucumber report in jenkins. But when i view th

相关标签:
4条回答
  • 2021-01-16 06:12

    I managed to get reports in jenkins now.

    Previously Jenkins is unable to find the json file in my project.

    I have set the path of json file as target and i could able to see the reports.

    0 讨论(0)
  • 2021-01-16 06:12

    I am able to solve by providing **/*.json under Post-build Actions/Cucumber Report/JSON Report Location/ File Include Pattern = **/*.json

    0 讨论(0)
  • 2021-01-16 06:28

    First of all in runner file we need to provide following plugin as follows: plugin= {"json:target/cucumber.json" }

    Now in Jenkins job, in "post build" section during configuration, add cucumber reports, click on advanced option and provide 'target' text in "JSON Reports Path" text field. Save the job, it will run and will work fine.

    Note: target text is the name of folder which we have provided in runner file for generating reports in Json, also cucumber report plugin works on json so need to generate report in json.

    0 讨论(0)
  • 2021-01-16 06:35

    This might help for those who are looking for answer.

    @CucumberOptions(
            features= "C:\\Users\\dd pc\\workspace\\PracticeCucumber\\src\\main\\java\\com\\qa\\feature\\Test.feature",
            glue= {"com\\qa\\stepDefinition"},
            format= {"pretty","html:test-output_1",
                    "json:target/cucumber-reports/CucumberTestReport.json"},
            plugin = ("json:target/cucumber-reports/CucumberTestReport.json"),
            monochrome= true,
            dryRun= false
    
            )
    
    0 讨论(0)
提交回复
热议问题