Based on the recent test coverage analysis of ODK-X AndroidLibrary, we've identified several classes that currently lack sufficient test coverage. To ensure better reliability and stability of the codebase, we need to write unit tests for these uncovered or partially covered classes.
Goal
Increase test coverage by writing unit tests for uncovered or partially covered classes in ODK-X AndroidLibrary.
1) Some of the functions that are presently not covered by the existing tests are privately scoped functions. Note that you are NOT expected to changed the scope of these functions to public. These private functions are called at certain points and your tests should utilize these points to verify the functionality of these privately scoped functions.
2) If you want to work on any other classes outsides these, create an Issue for the class you want to write a test for and mention this issue on it. The issue should be titled: Improve ODK-X AndroidLibrary Test Coverage: Write/Update Test(s) for <TestClassName> to ensure no duplicate work is done. Add a description of what you want to test in the issue created. Issues would be handled on a first-come, first-serve basis.
3) Run Tests Locally: After writing the tests, run them locally to ensure they pass and that the test coverage improves for the classes in question.Submit Pull Request: Once tests are complete, submit a pull request with your changes, along with screenshots of your passing test results and a brief explanation of the tests written .
Acceptance Criteria
Tests are written for the identified uncovered classes.
Branch off upgrade-jdk11
All newly written tests pass successfully.
The test coverage for ODK-X AndroidLibrary shows an improvement.
Pull request submitted for review with clear documentation on the covered classes.
Guidelines
Follow the project’s existing test structure and best practices for naming and organizing tests. Make sure tests are meaningful, concise, and comprehensive.
Description
Based on the recent test coverage analysis of ODK-X AndroidLibrary, we've identified several classes that currently lack sufficient test coverage. To ensure better reliability and stability of the codebase, we need to write unit tests for these uncovered or partially covered classes.
Goal
Increase test coverage by writing unit tests for uncovered or partially covered classes in ODK-X AndroidLibrary.
Tasks
Analyze Coverage Results: Review the test coverage report for ODK-X AndroidLibrary.
Classes to focus on
A good and easy place to look at would be the following classes: 1) Data class 2) Logging class 3) DateUtil class
Note
1) Some of the functions that are presently not covered by the existing tests are privately scoped functions. Note that you are NOT expected to changed the scope of these functions to public. These private functions are called at certain points and your tests should utilize these points to verify the functionality of these privately scoped functions.
2) If you want to work on any other classes outsides these, create an Issue for the class you want to write a test for and mention this issue on it. The issue should be titled:
Improve ODK-X AndroidLibrary Test Coverage: Write/Update Test(s) for <TestClassName>
to ensure no duplicate work is done. Add a description of what you want to test in the issue created. Issues would be handled on a first-come, first-serve basis.3) Run Tests Locally: After writing the tests, run them locally to ensure they pass and that the test coverage improves for the classes in question.Submit Pull Request: Once tests are complete, submit a pull request with your changes, along with screenshots of your passing test results and a brief explanation of the tests written .
Acceptance Criteria
Guidelines
Follow the project’s existing test structure and best practices for naming and organizing tests. Make sure tests are meaningful, concise, and comprehensive.
Resources
Test coverage report can be found at link to coverage report.
ODK-X AndroidLibrary repository: link to repo.