odk-x / tool-suite-X

ODK-X Tool Suite Project roadmaps, issue queue, release notes and wiki.
https://www.odk-x.org
Apache License 2.0
25 stars 43 forks source link

Write Unit Tests for Uncovered Classes in ODK-X Services #504

Open Lamouresparus opened 1 month ago

Lamouresparus commented 1 month ago

Description:

Based on the recent test coverage analysis of ODK-X Services, 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 Services.

Tasks:

  1. Analyze Coverage Results: Review the test coverage report for ODK-X Services to identify classes or methods that are not covered by tests.
  2. Create an Issue: For each class you want to write tests for, create a new issue in the repository titled: Improve ODK-X Services Test Coverage: Write/Update Test(s) for <ClassName> to ensure no duplicate work is done. Add a description of what you want to test in the issue created. Issues will be handled on a first-come, first-served basis.
  3. Write Unit Tests: After your issue is approved and assigned to you. You can then write tests to verify the expected behavior. Ensure that both positive and negative test cases are considered.
  4. 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.
  5. 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:

  1. Tests are written for the identified uncovered classes.
  2. Branch off upgrade-jdk11
  3. All newly written tests pass successfully.
  4. The test coverage for ODK-X Services shows an improvement.
  5. 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:

  1. Test coverage report can be found at link to coverage report.
  2. ODK-X Services repository: link to repo.
xadina02 commented 1 month ago

@Lamouresparus, can I work on this?

xadina02 commented 1 month ago

I'll hop right on this after submitting my starter issue. Hope that's okay ?!

Lamouresparus commented 1 month ago

@xadina02 I will suggest we work on #507 first, as that is more beginner friendly, before working on this.