This is a migrated thread and some comments may be shown as answers.

Blank image during test runs

12 Answers 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 15 Jul 2014, 05:36 PM
We have one of our Test Studio tests lists running several times per day.  There is one step in particular Test which fails intermittently.  I would like to try to understand the results of this test to help us debug and fix the test failure.  When I look at the Test Results for the failed step, the "Image" that Test Studio has captured is a black screen ("the black screen of death").

Can someone help us understand what the black image means at the time of failure?

What causes the failure is the following:
1) The Test Studio  test clicks on an item on the page.  
2) The item click causes a new page to load.
3) On then new page, Test Studio tries to click an element on the new page (it waits 30 seconds for the item to appear on the page).  This is the step that fails and generates the black screen.

Any help will be appreciated.

Thanks,
Steve

12 Answers, 1 is accepted

Sort by
0
Sebastian
Top achievements
Rank 1
answered on 16 Jul 2014, 12:49 PM
When the click step fails, is the button on the screen?

If it is, one or both or the attributes used to detect the button may be dynamic.
If they are, this means the name of the attribue has changed.

Say the TagIndex was,  "button572" when you recorded the click step.
Now when you run the test again, it might be named, "button570".

The User ID and TagName tend to be fixed even on a Dynamic page.

Sometimes I need to change the ID from an exacy match to StartWith as well.
0
Stephen
Top achievements
Rank 1
answered on 16 Jul 2014, 02:37 PM
Hi Sebastian,

We are checking for existence of the button inside an "If" statement.  Since the "Else" block is being executed, we can assume that the button was not found at the time when the test failed.  Here is the find logic for the button what we are trying to click:

id contains "ctl00_DefaultContent_rgAssetConfigList_ctl00__0"
tagIndex "is exactly" td:1

We can assume that there is one and only one item in the table, so index 1 should be fine.  This page is loaded with the item that was clicked on in the previous step.

I have attached the DOM for your review (this is the DOM of the expected page).

Would you advise changing the find logic? Is there a recommended way to handle the scenario where the button is not found?

Thanks,
Steve
0
Sebastian
Top achievements
Rank 1
answered on 16 Jul 2014, 02:43 PM
I would try changing tagindex to tagname.
Tagname should come up on the list on the left as, "td".

Run you test up to the failure point, pause the browser recording, go back to test sudio and Edit the Element Live.
See if either the Id or tagindex has changed.

I tend to see differences when I'm having problems like this.
0
Stephen
Top achievements
Rank 1
answered on 16 Jul 2014, 04:12 PM
Hi Sebastian,

I'll try the suggestion.  In the meantime, can you tell me why the image captured at the time of failure would be all black?

Thanks,
Steve
0
Sebastian
Top achievements
Rank 1
answered on 16 Jul 2014, 04:17 PM
I don't know why you're getting a black screen???

I've noticed overall that when I review the storyboards, some pages just don't capture???
0
Stephen
Top achievements
Rank 1
answered on 16 Jul 2014, 08:23 PM
 Hi Sebastian,

I set the FindLogic to:

id=ctl00_DefaultContent_rgAssetConfigList_ctl00__0,|,TagName=~td

but this did not work.  Is this what you were suggesting?  When I recorded the test, the Find logic was set to:

id=ctl00_DefaultContent_rgAssetConfigList_ctl00__0,|,tagIndex=td:1

this works most of the time, but not all the time. Can you suggest an alternative based on the DOM?
Thanks,
Steve
0
Sebastian
Top achievements
Rank 1
answered on 16 Jul 2014, 08:38 PM
Did you hand edit the line?

Or did you use the Elements box on the bottom right of the screen by right clicking and selecting Edit in Live?

Don't hand edit it, use the Edit in Live.
This way you can see what the Test Studio is viewing live and all the detection options.
0
Stephen
Top achievements
Rank 1
answered on 16 Jul 2014, 08:40 PM
I used "Edit in Live".   I don't see any useful options for finding the element...
0
Sebastian
Top achievements
Rank 1
answered on 16 Jul 2014, 08:51 PM
But did you hand edit the line you posted?

id=ctl00_DefaultContent_rgAssetConfigList_ctl00__0,|,TagName=~td
0
Stephen
Top achievements
Rank 1
answered on 16 Jul 2014, 09:27 PM
I tried Clicking in the left hand panel that said "TagName td" and then I changed it to "contains".  In other words, I did not hand edit the element.

-Steve
0
Sebastian
Top achievements
Rank 1
answered on 16 Jul 2014, 09:35 PM
So you only have two things,  id  and  tagname?

If yes, I not sure what else to try.

Maybe one of the guys that works for Telerik will have more ideas.
0
Boyan Boev
Telerik team
answered on 18 Jul 2014, 12:11 PM
Hi,

@Sebastian, thank you for your input. We really appreciate it.

@Steve, please confirm that the ID is static (i.e. it doesn't change).

Please send us the Execution log when the test fails so we can understand why the test fails.

Another option is to increase the time for waiting from 30 000ms to 60 000ms for example

Let me know if this helps.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Stephen
Top achievements
Rank 1
Answers by
Sebastian
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or