From c4d13b05a66e49188aed16296d53a775155a0da6 Mon Sep 17 00:00:00 2001 From: Eric Gundersen Date: Thu, 11 Dec 2025 09:45:06 -0700 Subject: [PATCH 1/4] Enhance issue templates for test coverage: refine Playwright template and add Java-specific template --- .../improve-test-coverage-java.yml | 110 ++++++++++++++++++ .../ISSUE_TEMPLATE/improve-test-coverage.yml | 6 +- README.md | 9 ++ 3 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/improve-test-coverage-java.yml diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml new file mode 100644 index 0000000..92408d0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml @@ -0,0 +1,110 @@ +name: Improve Test Coverage Java +description: Improve test coverage using JUnit (Java) +title: "Improve test coverage using JUnit (Java)" +labels: ["testing", "enhancement", "junit"] +assignees: + - copilot +body: + - type: textarea + id: repository-analysis + attributes: + label: Repository Analysis + description: Primary language and framework information + value: | + **Primary Language:** Java + validations: + required: true + + - type: textarea + id: objective + attributes: + label: Objective + description: Goal for test coverage improvement + value: | + Improve JUnit test coverage for this repo to ensure comprehensive testing aiming for at least 80% coverage across all categories: statements, branches, functions, and lines. If you cannot achieve this goal of 80% please do your best to improve test coverage as much as possible and explain why you aren't able to exceed 80% coverage if necessary. + validations: + required: true + + - type: textarea + id: instructions + attributes: + label: Instructions + description: Steps to follow + value: | + - Review existing test files, if present, to understand current coverage + - Analyze current test coverage using appropriate tools + validations: + required: true + + - type: textarea + id: general-instructions + attributes: + label: General Instructions + description: PR and testing guidelines + value: | + - Create a pull request for the unit test coverage improvements + - Minimize the number of commits + - Before starting, check coverage and print the human-readable result in the PR description + - If needed use Mockito to assist with mock objects for testing + - After completing the work, check coverage and print the human-readable result in the PR description + - Ensure all tests pass before asking for a review of the PR + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: Overview of the task + value: | + We need to improve the test coverage in our repository to ensure better code quality and reliability. This task involves writing additional unit tests for the existing codebase, identifying untested areas, and ensuring that all critical paths are covered. + validations: + required: true + + - type: textarea + id: tasks + attributes: + label: Tasks + description: Specific tasks to complete + value: | + - Review the current test coverage report to identify areas with insufficient coverage + - Write unit tests for uncovered or poorly covered code sections + - Ensure that all critical paths and edge cases are tested + - Refactor existing tests for better readability and maintainability, if necessary + - Update the test coverage report and ensure it meets the project's standards + validations: + required: true + + - type: textarea + id: acceptance-criteria + attributes: + label: Acceptance Criteria + description: Success criteria + value: | + - Test coverage should be increased by at least 50% with a goal of 80% of lines covered + - All new tests should pass without errors + - The updated test coverage report should reflect the improvements + validations: + required: true + + - type: textarea + id: current-coverage + attributes: + label: Current Coverage Metrics + description: Paste the current coverage report if available + placeholder: | + Statements: X% + Branches: X% + Functions: X% + Lines: X% + validations: + required: false + + - type: textarea + id: areas-of-focus + attributes: + label: Specific Areas of Focus + description: List any specific files, modules, or features that need priority testing + placeholder: List files or modules that need attention... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml index 9ef81c9..864cd5d 100644 --- a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml @@ -1,6 +1,6 @@ -name: Improve Test Coverage -description: Improve test coverage using Playwright or your testing framework of choice -title: "Improve test coverage using Playwright or your testing framework of choice" +name: Improve Test Coverage Playwright +description: Improve test coverage using Playwright (Typescript and Vue 3) +title: "Improve test coverage using Playwright (Typescript and Vue 3)" labels: ["testing", "enhancement", "playwright"] assignees: - copilot diff --git a/README.md b/README.md index d28b7df..98184d0 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,15 @@ Drive test coverage improvements with clear goals: - Before/after coverage reporting requirements - Structured acceptance criteria +### 4. Improve Test Coverage (Java) +**File:** `.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml` + +Focus on Java repositories that rely on JUnit: +- Emphasizes achieving at least 80% coverage with JUnit and Mockito support +- Requires documenting before/after coverage metrics in the PR description +- Highlights critical path testing plus refactoring existing tests when needed +- Provides detailed task list tailored to Java-specific edge cases + ## How to Use ### Option 1: Copy to Your Repository From b69f119fb0fd2f6529343319484185f214c24550 Mon Sep 17 00:00:00 2001 From: Eric Gundersen Date: Thu, 11 Dec 2025 15:41:18 -0700 Subject: [PATCH 2/4] Add guideline to avoid secrets in test coverage templates --- .github/ISSUE_TEMPLATE/improve-test-coverage-java.yml | 1 + .github/ISSUE_TEMPLATE/improve-test-coverage.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml index 92408d0..7213770 100644 --- a/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml @@ -48,6 +48,7 @@ body: - If needed use Mockito to assist with mock objects for testing - After completing the work, check coverage and print the human-readable result in the PR description - Ensure all tests pass before asking for a review of the PR + - Do not introduce any secrets or sensitive information in the tests validations: required: true diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml index 864cd5d..f88372f 100644 --- a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml @@ -47,6 +47,7 @@ body: - Before starting, check coverage and print the human-readable result in the PR description - After completing the work, check coverage and print the human-readable result in the PR description - Ensure all tests pass before asking for a review of the PR + - Do not introduce any secrets or sensitive information in the tests validations: required: true From e9b5a4b1045d93fbb436de07fc415b7519e5359d Mon Sep 17 00:00:00 2001 From: Eric Gundersen Date: Tue, 13 Jan 2026 11:13:56 -0700 Subject: [PATCH 3/4] Add mandates section to improve test coverage templates --- .../ISSUE_TEMPLATE/improve-test-coverage-java.yml | 12 ++++++++++++ .github/ISSUE_TEMPLATE/improve-test-coverage.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml index 7213770..c2a16cf 100644 --- a/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage-java.yml @@ -75,6 +75,18 @@ body: - Update the test coverage report and ensure it meets the project's standards validations: required: true + + - type: textarea + id: mandates + attributes: + label: Mandates + description: Mandates + value: | + - Do not perform synthetic testing or smoke tests. + - Do not use introspection or other tricks to inflate code coverage without valid unit tests. + - Do not create tests solely to increase test coverage alone without asserting expectations. + validations: + required: true - type: textarea id: acceptance-criteria diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml index f88372f..24657ee 100644 --- a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml @@ -75,6 +75,18 @@ body: validations: required: true + - type: textarea + id: mandates + attributes: + label: Mandates + description: Mandates + value: | + - Do not perform synthetic testing or smoke tests. + - Do not use introspection or other tricks to inflate code coverage without valid unit tests. + - Do not create tests solely to increase test coverage alone without asserting expectations. + validations: + required: true + - type: textarea id: acceptance-criteria attributes: From 888f3d216adab34cbf5f46b32587cb6da4974d87 Mon Sep 17 00:00:00 2001 From: Eric Gundersen <85637090+gundersen-lumn@users.noreply.github.com> Date: Tue, 13 Jan 2026 11:47:09 -0700 Subject: [PATCH 4/4] Update .github/ISSUE_TEMPLATE/improve-test-coverage.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/improve-test-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml index 24657ee..879d55c 100644 --- a/.github/ISSUE_TEMPLATE/improve-test-coverage.yml +++ b/.github/ISSUE_TEMPLATE/improve-test-coverage.yml @@ -83,7 +83,7 @@ body: value: | - Do not perform synthetic testing or smoke tests. - Do not use introspection or other tricks to inflate code coverage without valid unit tests. - - Do not create tests solely to increase test coverage alone without asserting expectations. + - Do not create tests solely to increase test coverage alone without asserting expectations. validations: required: true