Facing Issue with Sonar Test Cases Execution Count for IOS project

Hi,
We are working on Sonar for IOS Mobile Project. We successfully found a way (script) to create a code coverage XML file in Generic Coverage Test Data format.
But we haven’t found any solution for Test Execution. We tried using XCPretty, ocunit2junit, and link the generated file to sonar.cfamily.cppunit.reportsPath in sonar properties file, but no Luck

can anyone help me with this process to set Test Execution for the IOS project?

Your help will be much appreciated.

Hi @Manohar_Kola ,

Could you specify what programming language(s) you are using on your project, as well as what scanner and code repository provider you are using?

Hi @AlxO,
We are using Objective - c language and we are using Bit bucket as the repository.
as for the scanner, using SonarScanner only not using any other as of now.

Hi @Manohar_Kola ,

you should look at using the generic test execution report, see sonar.testExecutionReportPaths in this page: Test Coverage & Execution | SonarQube Docs.

The format is described under Test Execution in this page: Test Coverage & Execution | SonarQube Docs.

Hi @mpaladin,
Do you know how to achieve that? Like any Script or any article to convert Xcode Format to SonarQube Generic Format.
Thanks

Hi @Manohar_Kola ,

nope, I don’t know any. However it seems possible to ask Xcode to create a test report which you can translate to SonarQube format. If you search on the internet for xcrun xcresulttool json you should get some pointers, or look at xcpretty --report option.

Thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.