Skip to content
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

Write Unit Test for Uncovered Classes in ODK-X AndroidLibrary #507

Open
Stryker101 opened this issue Oct 9, 2024 · 2 comments
Open

Write Unit Test for Uncovered Classes in ODK-X AndroidLibrary #507

Stryker101 opened this issue Oct 9, 2024 · 2 comments

Comments

@Stryker101
Copy link

Stryker101 commented Oct 9, 2024

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

  • 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.

Resources

@Stryker101 Stryker101 added good first issue Good for newcomers androidlibrary ODK-X Android Library Outreachy Winter 2024 good second issue and removed good first issue Good for newcomers labels Oct 9, 2024
@siva224513
Copy link

can i work on this issue @Stryker101

@Stryker101
Copy link
Author

@siva224513 yes you can

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

No branches or pull requests

2 participants