Skip to content

Conversation

@mattinannt
Copy link
Member

This pull request introduces a new instrumented test class for FormbricksApiService and updates the SonarQube configuration to exclude additional files from code coverage analysis.

Exclusion of Formbricks Fragment:
It is a common and accepted practice in Android development to exclude pure UI components from code coverage metrics, focusing instead on testing business logic, data handling, and core functionality. This ensures that coverage metrics reflect the quality of the code that is most critical to the application's correctness and maintainability.

Testing Enhancements:

  • Added a new instrumented test class, FormbricksApiServiceInstrumentedTest, in android/src/androidTest/java/com/formbricks/android/network/FormbricksApiServiceInstrumentedTest.kt. This class includes a basic setup method and a test to verify the initialization of the FormbricksApiService without exceptions.

Configuration Updates:

  • Updated sonar-project.properties to exclude the FormbricksFragment.kt file from code coverage analysis.

@mattinannt mattinannt merged commit e41b52a into main May 15, 2025
4 checks passed
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants