diff --git a/src/main/java/org/sonar/plugins/scala/surefire/ScalaSurefireParser.java b/src/main/java/org/sonar/plugins/scala/surefire/ScalaSurefireParser.java index 6843505..d312984 100644 --- a/src/main/java/org/sonar/plugins/scala/surefire/ScalaSurefireParser.java +++ b/src/main/java/org/sonar/plugins/scala/surefire/ScalaSurefireParser.java @@ -73,6 +73,10 @@ private File[] getReports(File dir) { // maybe there's only a test suite result file unitTestResultFiles = findXMLFilesStartingWith(dir, "TESTS-"); } + if (unitTestResultFiles.length == 0) { + // maybe there's only a test suite result file + unitTestResultFiles = findXMLFilesStartingWith(dir, ""); + } return unitTestResultFiles; } @@ -84,7 +88,7 @@ public boolean accept(File dir, String name) { } }); } - + private void parseFiles(SensorContext context, File[] reports) { UnitTestIndex index = new UnitTestIndex(); parseFiles(reports, index);