Closed gooner22 closed 8 years ago
@gooner22
I used fastlane
's scan
tool too and got similar issue.
My JUnit test report looked like this:
xml version='1.0' encoding='UTF-8'?>
<testsuites tests='100' failures='0'>
<testsuite name='MyUnitTestTargetName.MyClassName' tests='2' failures='0'>
The MyUnitTestTargetName
is the name of unit tests target in my project.
This kind of report would not be picked up by Sonar then.
So I had to patch the report and remove the MyUnitTestTargetName.
part, to make it look like this:
xml version='1.0' encoding='UTF-8'?>
<testsuites tests='100' failures='0'>
<testsuite name='MyClassName' tests='2' failures='0'>
Since it's fastlane
I just stuck some extra steps into my Fastfile
to have the patching bit automated.
After this my test reports were properly picked up by Sonar plugin.
I'm not sure yet which tool is to blame here. Is it fastlane
/scan
putting extra info in the test suite name or is it sonar-swift
not being flexible enough to strip it out.
I think both tools are the problem here :)
scan
should have an option to control generation of JUnit reports, sonar-swift
should be flexible and understand all kinds of prefixes.
Hi,
I just fixed a bug with Junit Fastlane report naming and the plugin. See https://github.com/Backelite/sonar-swift/issues/29
I will release the fix soon.
Regards
This is fixed in release 0.2.4
@zippy1978 thanks!
Issue still present in the version 0.2.4 Pull request #28 tires to resolve the issue but hasn't been merge yet.
still relevant.
[00:40:06]: ▸ [35mINFO: Unable to locate test source file MY_MODULE/ATests.swift[0m
[00:40:06]: ▸ [35mINFO: Unable to locate test source file MY_MODULE/BTests.swift[0m
While uploading analysis to sonar, I get 0 tests count
I noticed following log
Env:
Notes: