Sonarqube + Cucumber + Gradle

断了今生、忘了曾经 提交于 2019-12-25 08:14:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!