我将sonarqube用于JS Project,我想将XML结果集成到单元测试中。我有这个错误:
ERROR: Caused by: Line 2 of report refers to a file which is not configured as a test file: modules/project/projectTest.js
我不明白为什么会出现这个错误。 对projectTest文件进行分析,是否需要设置一些内容,以便sonarqube可以将它们作为测试文件处理。
我的XML结果文件:
<testExecutions version="1">
<file path="modules/proejct/projectTest.js">
<testCase name="Test" duration="16"/>
</file>
</testExecutions>
谢谢你的hlep
答案 0 :(得分:0)
单元测试报告中引用的文件需要是测试文件,换句话说,它们应该由sonar.tests属性配置。请参阅文档https://docs.sonarqube.org/display/SONAR/Analysis+Parameters