sonarqubecucumber

Sonarqube and Cucumber features


Is there any way to include the test coverage of Cucumber features and other useful statistics in the SonarQube analysis? I have done a bit of researching, but couldn't find a proper plugin.


Solution

  • From this thread (written after the OP's question), David Racadon added:

    As far as I understand:

    • It is not possible to run an analysis on a project containing only test code because the 'sonar.sources' property is mandatory.
      • Measures on test code are not aggregated at project level.
        As far as I am concerned, I consider test files part of the project the same way source files are. Thus, measures of test files should be aggregated on top of source files.
        For now, SonarQube shows that your project is 1,000 lines even if you have 0 or 10,000 lines of test code on top of those 1,000 lines of source code. For me, SonarQube gives you a biased estimate of the size of your project and the effort of maintenance.

    The closest would then be his plugin racodond/sonar-gherkin-plugin which: