cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Test Automation - Getting Eclipse/JUnit tests to Degrade

frank_punzo
Guide

New to DT Test Automation. I would like to use Test Automation and the Eclipse Plugin to alert our development staff when their JUnit tests degrade in performance. I can't seem to get the tests to show as degraded and am wondering what I can tweak to get them to. I have altered the corridor settings as shown in this attachement (testautomationconfig.jpg) but it hasn't helped. I have created an application with a basic JUnit test. The application just adds two monitary values and the JUnit test calls the add function and then the equals function and asserts that the values added together equal the expected result. I am varying a wait in the add() function from 1 second to 15 seconds to degrade the performance outlined below.
Here's my JUnit test scenario :


Run 1 - completes in 1 second
Run 2 - completes in 1 second

Run 3 - completes in 1 second

Run 4 - completes in 1 second

Run 5 - completes in 15 seconds

Run 6 - completes in 15 seconds

Run 7 - completes in 15 seconds

Run 8 - completes in 15 seconds


My desire is for one of the test runs 5-8 to show as degraded. My expectation is that our developers won't pay too close attention to the amount of time spent in their tested functions. I would like to have Dynatrace flag a performance degradation to make it very obvious when a degradation occurs.

Thanks for the help

2 REPLIES 2

andreas_grabner
Dynatrace Guru
Dynatrace Guru

Hi Frank

If you open your Test Result Dashlet - do you see your JUnit Test showing up? If you then click on the test name - do you see the individual duration measures in the chart including the corridor

Also - have a quick look at my youtube webinar I did on Eclipse as well as Test Automation: https://www.youtube.com/watch?v=p4Vh6BWlPjg&list=P...

Andi

Just to update the community: we had a webex today and discussed your situation. The reason for your behavior is that the Eclipse Plugin always registered a "Unit Test" Test Category Test with Dynatrace. For Unit Tests, Dynatrace ONLY looks at certain Count Measures BUT NOT at Response Time measures. For that a "Performance Test" Test Category Test has to be registered. The Eclipse plugin doesnt provide that capability in the moment which is why we opened an issue with our plugin developers on github: https://github.com/Dynatrace/Dynatrace-Eclipse-Int...