Second issue that I am running into is when the coverage is running and I do some actions in the system say create a new case etc, the coverage report percentages changes, sometimes it drops and sometimes is increases so I'm curious to understand the reason for the same
After starting the coverage, users needs to execute rules ( generally by running tests like pegaunit / rspecs automation so that application rules gets covered ). The rules that gets executed between start and stop of coverage, reflects in the coverage report.
This also answers your second query, why some rules get covered when you perform some operation.
Coverage start and end are two demarcation points. Inbetween these two events, users needs to perform desired testing operations, so that rules gets covered.
Thank you very much for the answer, so what would be the recommendation to ensure consistency?
Also if this report is generated based on manual run , how does it work when it is integrated in pipeline? ( Validated Test coverage task). Does it just base it on the last test coverage report that was run manually?
After starting the test coverage session, tests (Manual / Automated) need to be executed and then once all testing is done, session should be stopped to get the coverage out of the testing performed.
The testing can be any type & need not be manual only. Any rule that gets executed in between start & stop would get counted for test coverage report.
We have 2 REST services, one to trigger test coverage, and other to stop and validate the report. We can configure these calls in the pipeline and we should call respective test execution services in between, to ensure proper coverage report is generated.