Unfortunately, neither I have only the class file name (ATest), nor I have a full path (tests/some/directories/ATest.swift): it doesn't include the directories ("some/directories" in the example) between the parent test directory and the test classes.
So, is there something wrong in my project, in slather or in sonar-swift?
In my opinion, you could simply patch your code by removing everything before the latest occurrence of "." in the "classname" attribute and search for the file as you already do.
Let's say in my project I have a test which is in the directory
tests/some/directories/ATest.swift (test "testAll" inside)
When I produce a cobertura report using slather the result for that class/test is:
As you say at https://github.com/Backelite/sonar-swift/blob/master/src/main/java/org/sonar/plugins/swift/tests/SwiftSurefireParser.java, method getUnitTestResource: "Most xcodebuild JUnit parsers don't include the path to the class in the class field, so search for it if it wasn't found in the root"
Unfortunately, neither I have only the class file name (ATest), nor I have a full path (tests/some/directories/ATest.swift): it doesn't include the directories ("some/directories" in the example) between the parent test directory and the test classes.
So, is there something wrong in my project, in slather or in sonar-swift?
In my opinion, you could simply patch your code by removing everything before the latest occurrence of "." in the "classname" attribute and search for the file as you already do.