Discussion
Wipro
US
Last activity: 21 Jun 2023 15:41 EDT
Code/Rule Coverage in Pega
Hi, I have a requirement to get a report in pega showing the rule/code coverage. Lets say QA/UAT is running the testcase and in the backend there will be number of rules executed. We want to know out of 1000 rules how many got executed? I am looking to generate a weekly. Pega caches most of the rules in server/cllient/DB etc... Is there a way to do it in Pega?
Sri.
***15/02/2017: Updated by moderator: Lochan to the details of the SR and enhancement***
added Idea specialized tag***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
JP
hope below prhelp article helps
https://community.pega.com/sites/default/files/help_v719/procomhelpmain.htm
Updated: 21 Jun 2023 14:51 EDT
Wipro
US
Thanks for the update. The Log-Usage is sharing a lot of information. But i could not find how many rules got executed at a given time (say weekly). And it also runs on cache. But all the rules might not hit the cache. So how do I get the related information?
Sri.
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
IN
would the data in peek column under class management at SMA be of use/help?
Updated: 21 Jun 2023 14:51 EDT
Wipro
US
I have gone thourgh the Log-RuleUsage and Log-usage but pxNumPeeks property gives us the Number of times the class loader checked to see whether this entry was loaded. This is related to one rule or all the rules? I am looking for total DISTINCT rules executed for a given time.
Sri.
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
IN
I don't think there is any OOTB reporting functionality to find rule coverage yet, if not wrong!
Updated: 21 Jun 2023 14:51 EDT
Pegasystems
US
If design view for a section is showing the included sections, does that showing of the included section “count” as rule coverage of that inner section ? Or does it only count if the app is actually run ? Things like this could make it harder to determine what an actual usage rule consists of. Without this need to distinguish, one could use a direct db row tracer, and merely say that any rule accessed from the db “counts” as a covered rule. /Eric
Updated: 21 Jun 2023 14:51 EDT
Wipro
US
Thanks for the update. if a section has inner section, and when it is shown on the screen, it is fetched from either cache or DB and rendered on the screen. So I would consider the rule count as 2 (+ properties count etc...).
Regarding DB row tracer and DB counts I would like to get more details. lets say if a rule is already fetched from DB once it is cached for next time and I will not get accurate results from 2nd or 3rd time on wards. So how do we solve the problem?
Log-RuleUsage is showing only the cached information (if I am not wrong)... And every rule might not be cached as well. So how do we resolve this?
Sri.
Updated: 21 Jun 2023 14:51 EDT
Pegasystems
US
The first note in this discussion said the desire is to know whether a rule is getting executed, rather than how many times.
So, I would think that could be achieved as follows:
1) Make sure the computer is only being used for running the tests and not for editing. That way you can be sure you're not referencing any inner sections for editing an outer section, and therefore if the inner section is referenced at all, you can assume you do want to count it, and it was therefore referenced by one of your tests.
2) Truncate all cache tables so that any rule reference forces a db row access.
3) Put a db-level tracer on your rows, and count any row access to a rule as a usage of that rule.
/Eric
Updated: 21 Jun 2023 14:51 EDT
Wipro
US
Thanks for the update but this would be a painful process as every time we cant truncate the cache in higher env. We want a ongoing process where every week/date frequency would like to know how many rules got executed. We cant clear the cache every time a new application enhancement is added or a test case is executed. is there an alternative way? If it is the limitation of the product, i would like to request product enhancement feature.
Sri.
Updated: 21 Jun 2023 14:51 EDT
Pegasystems
US
I agree that having some UI to make this convenient in the product would be great, so please do submit a proposal. However, continuing to think about what is possible given today’s system, if you’re able to turn on the Pega tracer with all event types, while you run your test, and then use the “save” button in the tracer, you can sort the records in the resultant (xml) file by the right-hand tracer column, since that column gives the key of every rule the tracer recorded, so in that manner you can know not only what rules were recorded, but how many times. /Eric
Updated: 21 Jun 2023 14:51 EDT
Wipro
US
Tracer is good only when for that instance of test case or 1 query. But for a week of rule usage we cant do tracer. I have opened a SR for this.
Sri.
Updated: 21 Jun 2023 14:51 EDT
Pegasystems
US
Thanks for the heads up. I am following that sr with interest ! /Eric
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
US
Thanks for opening an SR. Could you please share the number so we can track it for you in this post?
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
US
Thanks Sri! I have updated the thread!
Updated: 21 Jun 2023 14:51 EDT
McGraw-Hill Companies Inc
US
Hi Marissa,
I am looking for the specifics of this SR.But it seems I dont have access to the details.How can I access the SR ?
Sunil
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
US
Hi Sunil,
It looks like this SR was turned into a product enhancement and this SA-16658 was generated. Please take a look at this SA for more information and follow up with your Account Executive for next steps.
Thanks!
Updated: 21 Jun 2023 14:51 EDT
Accenture
SG
Hi,
Does anyone know what the progress is for this SR-A11518? I am unable to access the link
Thanks
Updated: 21 Jun 2023 14:51 EDT
Pegasystems Inc.
IN
Hi Gunawan,
I took a look into this SR for you and a product enhancement was created as a result of the investigation. Take a look at SA-16658 to know more. I have added the enhancement request number to the original post above under the Related Support Case Number field. You must follow-up with your Pega Account Executive, in case you need any information on the enhancement.
Thank you