Quantcast
Channel: PTC Community : Document List - All Communities
Viewing all articles
Browse latest Browse all 1247

How To: Update Test Metrics on Test Objective

$
0
0

Hello Community,

 

we are often asked why in the ALM Solution the item metrics are updated only once a day.

Actually, it is implemented that way, especially because such an update might take a long time and would affect the end users GUI performance negatively.

 

But, still companies are asking for a solution.

 

First of all, it is NOT suggested to change the field definition to perform the update dynamically. ´

 

What alternatives we offer?

 

Take a look at the attached trigger script.  This script updates the Test Metrics on Test Objective level as soon as a Test Session is set to completed.

 

IMPORTANT: This trigger script is in experimental state. For sure you are welcome to try this out in your own TEST environment.

If you enable the parameter, it will also update the Test Objective parent, which should be another Test Objective or a Test Plan item.

 

Trigger: Recalc Test Metrics

Type: rule

Rule: ((field["Type"] = "Test Session") and (field'["State"] = "Completed") and (field["State"] != field'["State"]))

Scriptfile: recalcTestMetrics.js

Script timing: post

 

Any feedback is welcome!

 

Volker

 

// the Server log should print this. You can enable CUSTOM  logging level to get the script details

[Server] CUSTOM(1): recalcTestMetrics.js: START: Running for Test Session ID 21722 in state Completed

[Server] GENERAL(10): Performing calculations to history for field Test Objective Fail Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Total Fail Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Test Objective Pass Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Total Pass Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Test Objective Other Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Total Other Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Test Objective Run Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] GENERAL(10): Performing calculations to history for field Total Run Count

[Server] GENERAL(10): Calculating only issues [21720]

[Server] CUSTOM(1): recalcTestMetrics.js: END.


Viewing all articles
Browse latest Browse all 1247

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>