Sunday, 15 February 2015

c# - How can i minimize performance hit for Coded ui when using nested if statement in test method -


Is there a way to reduce the display code when I either have my coded UI Running the exam or debugging me Currently it takes me a long time to run my coded UI test because it takes more time to execute it. I have "time has passed and very long means that to check that a screen is present and takes more than 1min, it takes me long to debug and eliminate it.

Some other backgrounds.If these statements are inside a test method, where I am checking different screens, it is very dynamic but takes a long time to run. I have read that I can test the order can But I do not think I can make an order to test with these dynamic screens (the reason I think the order does not test that as soon as there is a statement for the dynamic dialog and screen) and plus I think this architecture The process is too late to go on.

I have tried the following playback settings with little or no improvement.

Here's my current playback set Drugs

  playback. Playback settings. Prticshafrend Lilevl = wait Krenred Lilevl. Disabled; // playback Satingsksmartmacoposn = Smartmacopeshns. A; playback. Plebaksetings. Reset max = 10; Playback K.PlaybackSettings.ShouldSearchFailFast = false; Playback Playback settings. Delayetin action = 1000; Playback Playback setting. Search timeout = 2000;  

None of these settings has been able to help turn off Smart Options.

I could have sworn that I have read somewhere that if I replace my statement

Try it with the help that it will help, but I will be completely Could be wrong because I am trying to grab the straw only to increase the rate of 40% or less.

Text "itemprop =" text ">

I guess the statements are of a kind:

  if (utstech control. Axis) {something}  

If so - your delay is the result of Koditui who is searching for control - one time expensive operation - especially when searching for a control Are those that do not exist.

There are several ways to handle it - if my guess is in the ball park - please confirm and I will expand the options.

Update:

  1. The main reason for delays is maximum reset = 10 and additionally try the following settings:

    < Pre> playback Playback settings. Reset max = 3; Playback Playback settings. Delayetin action = 100; Playback Playback setting. Search timeout = 15000;
    1. While waiting for the control:

        uiTtestControl.WaitForControlExist (5000)     

      This will tell playback to search for control for a maximum of 5 seconds. Apart from this - you should reduce playback. Playback Settings Before searching for a control, search timeout that you know does not exist:

        var default timeout = playback. Playback setting. Search timeout; Playback Playback setting. Search timeout = 5000;  
    2. And after ending the search, return it to the default value:

        playback. Playback setting. Search timeout = default timeout;  

      This should do the trick


No comments:

Post a Comment