SonarQube generic test report is ignored

Must-share information (formatted with Markdown):

  • SonarQube version: Enterprise 10.2
  • Scanner CLI version: 5.0.1.3006
  • SonarQube is deployed via Docker
  • Cucumber via JavaScript NPM: 9.1.2
  • I am trying to configure the SonarQube scanner cli to upload my “Generic test coverage” report (generated by Cucumber) to SonarQube.
  • I have tried the following:
    • Ensured that the generated report is in the correct format, as stated in the docs.
    • Added various flag/parameters to the SonarQube CLI scanner (sonar.language, sonar.test, sonar.sources, etc).
    • Turned on verbose to get more logs.
    • SonarQube CLI Command:
    • -Dsonar.projectKey=PROJECT_KEY \
    • -Dsonar.testExecutionReportPaths=./cucumber.xml \
    • -Dsonar.tests=tests/ \
    • -Dsonar.test.inclusions=./**/* \
    • -Dsonar.sourceEncoding=UTF-8 \
    • -Dsonar.sources=tests/ \
    • -Dsonar.projectVersion=1.0 \
    • -Dsonar.verbose=true \
    • -Dsonar.language=js \
    • -Dsonar.javascript.file.suffixes=.js,.jsx

I get the following message***

08:25:14.828 INFO: Sensor Generic Test Executions Report
08:25:14.828 INFO: Parsing /workspaces/repository/javascript-cucumber/cucumber.xml
08:25:14.855 INFO: Imported test execution data for 0 files
08:25:14.856 INFO: Test execution data ignored for 1 unknown files, including:
lambda.feature

Hey there.

lambda.feature doesn’t seem like a file that would get analyzed by SonarQube (there’s no native support for a file with the .feature file extension). What language is this file written in?

Hi Colin,

Thanks for the reply, this is a Cucumber Gherkin step files, it is combined with JavaScript tests. Unfortunately I saw that the .feature files and Cucumber are not well integrated in Sonar(yet).