Skip to content

Sonar does not display tests and code coverage  #102

@issemLenoil

Description

@issemLenoil

I am using Sonarqube 6.5 and sonar-swift 0.3.5.

My tests have structure like this:

-- MyAppTests
------ MyExampleTest.swift
------ FolderWithOtherTests
---------- MyClassTest.swift
------ AnotherFolderWithTests
---------- AnotherClassTest.swift

In sonar-project.properties I set the following path to test directories:
sonar.tests=MyAppTests

After running run-sonar-swift.sh, I get logs:

WARN: Resource not found: MyAppTests.MyClassTest
WARN: Resource not found: MyAppTests.AnotherClassTest

why are MyClassTest, AnotherClassTest searched directly in the MyAppTests folder?

Finally, on the Sonarqube dashboard, in section Measures/Coverage, only test MyExampleTest.swift is visible.
Percentage unit tests coverage is not shown.

Sonar reports coverage.xml and TEST-report.xml are generated properly.

Has anyone got an idea what could be the cause?
How to solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions