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

feat: filter test execution by test plan case IDs #154

Merged
merged 3 commits into from
Nov 25, 2024
Merged

feat: filter test execution by test plan case IDs #154

merged 3 commits into from
Nov 25, 2024

Conversation

gibiw
Copy link
Contributor

@gibiw gibiw commented Nov 22, 2024

This pull request includes several updates to the qase-java project, including the addition of a new feature, version updates, and workflow changes. The most important changes are grouped by theme below.

New Feature:

  • Added support for running only the tests included in a test plan. This feature can be enabled by specifying the test plan ID in the reporter configuration, either in the qase.config.json file or through the QASE_TESTOPS_PLAN_ID environment variable. (changelog.md, qase-java-commons/src/main/java/io/qase/commons/client/ApiClient.java, qase-java-commons/src/main/java/io/qase/commons/client/ApiClientV1.java, qase-java-commons/src/main/java/io/qase/commons/client/ApiClientV2.java, qase-java-commons/src/main/java/io/qase/commons/reporters/CoreReporter.java, qase-java-commons/src/main/java/io/qase/commons/reporters/FileReporter.java, qase-java-commons/src/main/java/io/qase/commons/reporters/InternalReporter.java, qase-java-commons/src/main/java/io/qase/commons/reporters/Reporter.java, qase-java-commons/src/main/java/io/qase/commons/reporters/TestopsReporter.java) [1] [2] [3] [4] [5] [6] [7] [8] [9]

Version Updates:

  • Updated the version in the pom.xml files from 4.0.2 to 4.0.3 for various modules. (qase-api-client/pom.xml, qase-api-v2-client/pom.xml, qase-cucumber-v3-reporter/pom.xml, qase-cucumber-v4-reporter/pom.xml, qase-cucumber-v5-reporter/pom.xml, qase-cucumber-v6-reporter/pom.xml, qase-cucumber-v7-reporter/pom.xml, qase-java-commons/pom.xml) [1] [2] [3] [4] [5] [6] [7] [8]

Workflow Changes:

  • Removed the deployment workflow for Maven Central from the .github/workflows/deploy.yml file. (.github/workflows/deploy.yml)

Code Enhancements:

  • Modified PlanConfig to use Integer instead of int for the id field. (qase-java-commons/src/main/java/io/qase/commons/config/PlanConfig.java)
  • Added necessary imports and refactored code in various files to support the new feature and improve code quality. (qase-java-commons/src/main/java/io/qase/commons/client/ApiClientV1.java, qase-java-commons/src/main/java/io/qase/commons/client/ApiClientV2.java, qase-java-commons/src/main/java/io/qase/commons/reporters/CoreReporter.java, qase-java-commons/src/main/java/io/qase/commons/reporters/FileReporter.java, qase-java-commons/src/main/java/io/qase/commons/reporters/TestopsReporter.java) [1] [2] [3] [4] [5] [6]

- Removed the 'deploy' pipeline as it is no longer needed.
- Renamed the 'maven-verify' pipeline to 'build' for better clarity and alignment with its purpose.
Enhanced functionality to execute only the test methods specified in a test plan.

### Details:
- **Filter logic**: Test methods are filtered based on matching case IDs from the test plan.
- **Fallback behavior**: If no case IDs are defined, all test methods are executed as usual.
- **Configuration**: Case IDs are sourced via the `QASE_TESTOPS_PLAN_ID` environment variable or `qase.config.json`.

### Code improvements:
- Refactored the `intercept` method for better readability and efficiency.
- Added the `hasMatchingCaseId` helper method to encapsulate filtering logic.
@gibiw gibiw merged commit f47ef2a into main Nov 25, 2024
4 checks passed
@gibiw gibiw deleted the feat/testng branch November 25, 2024 09:16
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.

1 participant