-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code duplication / Unit test number not correct #92
Comments
No one...? |
I need to check but if I remember right it's sonar.objectivec.testScheme that is used to run the tests and get the unit test report and coverage report. sonar.tests is a default SonarQube parameter, I have to check what it exactly does in case of this plugin. What happens if you don't set it? |
I indeed set 'sonar.objectivec.testScheme' to my test scheme, so that's correct for sure. The tests are running, so that's not the problem. I also see the coverage report as you see in the image attached, the problem is that I don't see how many Unit Tests I have, how many are succeeded and/or how many are failed... My folder structure is like this: When I set sonar.tests to <main_folder>/tests, I have the issue like on the image attached. When I set sonar.tests to <main_folder>/tests/model,<main_folder>/tests/util (so added the subfolders separately), the number of tests are shown correctly. Nevertheless, when I now add a test in <main_folder>/tests, I don't see it added, except when I also add <main_folder>/tests to sonar.tests. But when I try that, I get an error that I can't add a folder multiple times to sonar.tests (because <main_folder>/tests/model/ and <main_folder>/tests/util/ are subfolders of <main_folder>/tests/) |
can you check what is the content of TEST-report.xml in the folder 'sonar-reports' at the root of your project? Does it contain all test cases, or only the one from the folders sonar.tests? I have checked my personal projects, and I am not setting sonar.tests. Could try that? Otherwise have you tried to put a wildcard in sonar.tests? Like /tests/** (I have not tried it, sorry)? |
Could you maybe give me an example project where you have the same situation working? So with the folder structure I described...? |
Any JUnit reporter for Xcode projects I've tried using does not record a fully qualified class name (with the package representing the directory to the class file) in the XML. PR #97 fixes this by searching the test sources index for |
Hi Cyril, I'm also setting up an objc project and I have the exact same problem. It only looks directly under the folders setup in source.tests, not recursively. I have a mixed objc/swift project, and when I use the swift plugin it drills through all the subfolders and finds the tests. Hence I think the problem is with the plugin. Do you have any time to look into this? |
Hello,
I almost set up the project correctly, nevertheless some things are not working. My unit test coverage, my issues are shown correctly and also my number of lines / comments are correct.
Code duplication is not working and I can't find what I'm doing wrong.. Do I have to enable something somewhere? Also, I have a folder 'tests/classes' with subfolders model, viewmodel, etc. If i set 'sonar.tests' to 'tests/classes', the number of tests is not shown (the test coverage is). If I add all the subfolders separately, they do. So it appears that that call is not working recursively. Do I need to change a setting for that or do I really need to add all my subfolders manually?
Kind regards!
Jens
The text was updated successfully, but these errors were encountered: