问题
Whenever I try to run ./gradlew sonarqube I get the following message:
Scenario: This is a test # sample/helloworld/readycheck.feature:3
Given This is my first step # StepDefinitions.This_is_my_first_step()
When This is my second step # StepDefinitions.This_is_my_second_step()
Then This is my third step # StepDefinitions.This_is_my_third_step()
1 Scenarios (1 passed)
3 Steps (3 passed)
0m0.221s
sample.helloworld.ReadyCheckTest > testDoGet STANDARD_OUT
Checking ready status...
Returing ready code: 200
sample.helloworld.ReadyCheckTest > testDoPost STANDARD_OUT
Set isReady to true
:buildDashboard UP-TO-DATE
:sonarqube
Resource not found: Scenario: This is a test
BUILD SUCCESSFUL
Total time: 11.112 secs
However, I do not have cucumber report on Sonar. How do I get it to show up on the dashboard?
回答1:
SonarQube Java and Groovy plugins only support test reports that follow "surefire" format (Maven).
If this is not the case for cucumber you can try to convert your reports to either Surefire (and continue to rely on Java/Groovy plugins to import them) or to a generic XML format that will be imported by the SonarQube Generic Test Coverage plugin.
来源:https://stackoverflow.com/questions/38621818/sonarqube-cucumber-gradle