NIFI-15432 Add system tests to code coverage workflow#10735
NIFI-15432 Add system tests to code coverage workflow#10735exceptionfactory merged 1 commit intoapache:mainfrom
Conversation
ac38c8c to
ea5aa83
Compare
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for working on this substantive improvement to code coverage tracking @pvillard31. The general approach of passing the JaCoCo agent handling through the system tests looks like a good strategy.
On initial review, my primary concern is the extensive amount of scripting in the code coverage workflow, in particular the complex sed and grep commands. At minimum, extracting this logic to an external script would support testing and maintenance. However, it does make me wonder if there are other options with potentially less scripting involved.
- Add system-tests job to collect coverage from spawned NiFi instances - Configure JaCoCo agent injection via JACOCO_AGENT_PATH environment variable - Modify SpawnedStandaloneNiFiInstanceFactory to configure JaCoCo agent in bootstrap.conf - Collect and merge jacoco.exec files from system tests and stateless tests - Convert merged coverage data to XML format for Codecov upload - Dynamically extract module list from nifi-code-coverage/pom.xml - Add nifi-registry-integration-tests profile to integration tests job - Add jacoco.version property to root pom.xml for workflow compatibility
|
Thanks for the feedback @exceptionfactory - I extracted the scripting into an external dedicated script file. Given the nature of the system tests and how they work / are executed, I didn't find any other (better) option during my testing. |
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for moving the script to a separate file @pvillard31, the approach looks good! +1 merging
- Add system-tests job to collect coverage from spawned NiFi instances - Configure JaCoCo agent injection via JACOCO_AGENT_PATH environment variable - Modify SpawnedStandaloneNiFiInstanceFactory to configure JaCoCo agent in bootstrap.conf - Collect and merge jacoco.exec files from system tests and stateless tests - Convert merged coverage data to XML format for Codecov upload - Dynamically extract module list from nifi-code-coverage/pom.xml - Add nifi-registry-integration-tests profile to integration tests job - Add jacoco.version property to root pom.xml for workflow compatibility Signed-off-by: David Handermann <exceptionfactory@apache.org>
- Add system-tests job to collect coverage from spawned NiFi instances - Configure JaCoCo agent injection via JACOCO_AGENT_PATH environment variable - Modify SpawnedStandaloneNiFiInstanceFactory to configure JaCoCo agent in bootstrap.conf - Collect and merge jacoco.exec files from system tests and stateless tests - Convert merged coverage data to XML format for Codecov upload - Dynamically extract module list from nifi-code-coverage/pom.xml - Add nifi-registry-integration-tests profile to integration tests job - Add jacoco.version property to root pom.xml for workflow compatibility Signed-off-by: David Handermann <exceptionfactory@apache.org>
Summary
NIFI-15432 Add system tests to code coverage workflow
nifi-code-coverage/pom.xmlnifi-registry-integration-testsprofile to integration tests jobWhen doing testing in my fork, it's getting us to 60%+ of coverage.
https://app.codecov.io/github/pvillard31/nifi/commit/ec991a105874edbd925a95bb6eea9c2d060561e1/tree
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation