Bug while playing back

How to apply eValid to functional testing of web applications.

Bug while playing back

Postby mssl » Thu Nov 25, 2010 9:35 am

Hi Team,

I am using DWindowset function to validate whether a particular window with title evalid pops up.
While playing back, the pop-up window sometimes has a title "<evplay> evalid", sometimes "evalid". Unable to predict and code.

A Surprising behaviour, in some occasions though the screen pops up with this title"<evplay>evalid", the case passes.

I need to fix this to make the tool reliable. Please help.
mssl
 
Posts: 16
Joined: Tue Sep 07, 2010 8:51 pm

Re: Bug while playing back

Postby eValid » Tue Nov 30, 2010 5:36 pm

Thank you for your patience, as we review your reported play back issues dealing with eValid's DWindowSet command, can you please provide us with a bit more details...

During your commented "A Surprising behaviour, in some occasions though the screen pops up with this title "<evplay>evalid", the case passes." instances, can you please let me know whether your scripted command contained "evalid" only or "<evplay>evalid"?

________________________
eValid Tech Support Team
eValid
 
Posts: 2399
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA

Re: Bug while playing back

Postby mssl » Wed Dec 01, 2010 4:34 am

my script contains only <evalid>
mssl
 
Posts: 16
Joined: Tue Sep 07, 2010 8:51 pm

Re: Bug while playing back

Postby eValid » Thu Dec 09, 2010 6:08 pm

Thank you for your continuing patience.

Can you please also email us or post to this thread the contents of your .evs script file and its corresponding *.E.log contents when such an ERROR is generated? If you do not want to reveal your entire script and event files, then a few lines before and after from both would be greatly appreciated.

________________________
eValid Tech Support Team
eValid
 
Posts: 2399
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA

Re: Bug while playing back

Postby mssl » Wed Dec 15, 2010 3:34 am

The following script is executed on regression basis.

My Script
# Recording by eValidâ„¢ V9 Build #293, Build Date: (Jan 13 2010)
# Copyright © 2009 by Software Research, Inc.
# Recording made on: Microsoft Windows XP Service Pack 2 (IE #6.0.2900.2180), HostName "products"
# Recording started at: <2010/11/11 20:57:13>
#
PlayValue _PT 6000
#<Code Truncated>

InputValue 0 130 "TEXT" "" "numbercode" "we" "" "number:7" NAV

#this textbox accepts only integers if string given, 2 pop-box pops up one #after the other saying "only numbers are accepted" #and another #saying "enter a number between 0 to 199"

TabKey 0
DWindowSet 1 "eValid" 371 289 282 126
KeySys 0 13 0 1
DWindowSet 1 "eValid" 371 289 282 126
KeySys 0 13 0 1

<Scirpt Ends>
======================

E.log on a day when this case was sucessful.
-------------------------------------------
# Playing script, line 53:
# 53: TabKey 0
2010/12/15 16:39:25 61 22 53 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21828 32 - Tab Key event
2010/12/15 16:39:25 62 22 53 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21828 0 32 Command completed: TabKey
# ------------------------------------------------------------
# Playing script, line 55:
# 55: DWindowSet 1 "eValid" 371 289 282 126
2010/12/15 16:39:25 63 23 55 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21859 31 - Waiting for Desktop Window, "eValid"
2010/12/15 16:39:25 64 23 55 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21921 62 - Identified and Set Desktop Window, "eValid" [1]
2010/12/15 16:39:25 65 23 55 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21937 16 109 Command completed: DWindowSet
# ------------------------------------------------------------
# Playing script, line 56:
# 56: KeySys 0 13 0 1
2010/12/15 16:39:25 66 24 56 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21968 31 - Keyboard Action [key=13, keyboard_state=0, rep_count=1]
2010/12/15 16:39:25 67 24 56 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 21968 0 31 Command completed: KeySys
# ------------------------------------------------------------
# Playing script, line 57:
# 57: DWindowSet 1 "eValid" 371 289 282 126
2010/12/15 16:39:25 68 25 57 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 22000 32 - Waiting for Desktop Window, "eValid"
2010/12/15 16:39:25 69 25 57 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 22062 62 - Identified and Set Desktop Window, "eValid" [1]
2010/12/15 16:39:25 70 25 57 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 22078 16 110 Command completed: DWindowSet
# ------------------------------------------------------------
# Playing script, line 58:
# 58: KeySys 0 13 0 1
2010/12/15 16:39:25 71 26 58 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 22109 31 - Keyboard Action [key=13, keyboard_state=0, rep_count=1]
2010/12/15 16:39:25 72 26 58 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 22109 0 31 Command completed: KeySys

==========================================================
E.log on a day when this case was not sucessful.
---------------------------------------------
# Playing script, line 53:
# 53: TabKey 0
2010/12/08 01:16:41 60 22 53 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 23703 344 - Tab Key event
2010/12/08 01:16:41 61 22 53 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 23703 0 344 Command completed: TabKey
# ------------------------------------------------------------
# Playing script, line 55:
# 55: DWindowSet 1 "eValid" 371 289 282 126
2010/12/08 01:16:41 62 23 55 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 24062 359 - Waiting for Desktop Window, "eValid"
2010/12/08 01:16:41 63 23 55 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 24125 63 - Identified and Set Desktop Window, "eValid" [1]
2010/12/08 01:16:41 64 23 55 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 24140 15 437 Command completed: DWindowSet
# ------------------------------------------------------------
# Playing script, line 56:
# 56: KeySys 0 13 0 1
2010/12/08 01:16:42 65 24 56 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 24469 329 - Keyboard Action [key=13, keyboard_state=0, rep_count=1]
2010/12/08 01:16:42 66 24 56 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 24484 15 344 Command completed: KeySys
# ------------------------------------------------------------
# Playing script, line 57:
# 57: DWindowSet 1 "eValid" 371 289 282 126
2010/12/08 01:16:42 67 25 57 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 24812 328 - Waiting for Desktop Window, "eValid"
2010/12/08 01:16:48 68 25 57 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 TIMEOUT 30812 6000 - Expected window did not appear
2010/12/08 01:16:48 69 25 57 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 TIMEOUT 30812 0 6328 Command completed: DWindowSet
# ------------------------------------------------------------
# Playing script, line 58:
# 58: KeySys 0 13 0 1
2010/12/08 01:16:48 70 26 58 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 31156 344 - Keyboard Action [key=13, keyboard_state=0, rep_count=1]
2010/12/08 01:16:48 71 26 58 Project ISS_PQA_WEB ISS_PQA_WEB_8021x_NEG_2 OK 31156 0 344 Command completed: KeySys

==============================================================



We tried increasing wait time, but still we face issue
mssl
 
Posts: 16
Joined: Tue Sep 07, 2010 8:51 pm

Re: Bug while playing back

Postby eValid » Fri Dec 17, 2010 12:18 pm

Some times a question comes along that is a real stumper. This is one of those instances. The good news is that we have it resolved. Here is the complete sequence of the thinking involved.

(A) BACKGROUND

To begin with, let's summarize the information we have available to analyze this problem: (1) we do NOT have access to the application; (2) the script fragment shown above was NOT actually recorded "from life" but was hand-scripted; (3) the reporting of what was and wasn't seen on the screen during playback is not complete or seems to be somewhat contradictory; and, (4) we only have a few fragments of the playback event log.

Normally, to diagnose a problem we need access to the application, the complete script, and the complete event log.

(B) DESKTOP WINDOW TITLE ROLE & DWindowSet COMMAND

eValid records where a desktop window was and what its title is with the DWindowSet command. It needs this so that, at playback time, it will "do the right action, on the right window."

When eValid records action on a desktop window that does not have a title, eValid inserts "eValid" as the title, because at playback time you don't want the playback engine to try to find the window that has no title (there may be a lot of them).

Then, at playback time, eValid performs this nice little trick of marking already-checked desktop windows by prepending "<eVPlay>" on the title. After a desktop window is so marked it's title may be "<eVPlay> eValid" as is suggested in this issue.

(C) OTHER DIAGNOSTIC CLUES

Here is the key diagnostic clue to this puzzle.

You will note in the proposed script there are TWO windows, as indicated by the two successive DWindowSet commands, both without a title, that are the same size and are located at exactly the same spot on the desktop (the four numeric parameters).

Which one of them is "on top"? That's important to know because a KeySys command will issue a keystroke to the desktop at a particular location and that keystroke will be interpreted by only ONE of these two windows, the one that is on top. But which one is on top?

(D) DIVERSIONARY SUGGESTIONS

While the author is creative in trying to understand what is going on with a playback that works sometimes and then later doesn't work, that information isn't actually useful.

It would have been better if the intent of the constructed passage was better explained. And, it would have been nice to know WHY the application pops up TWO successive modal dialogs that both have to be dismissed.

The explanation we believe is the correct one was found by, in the end analysis, disregarding most of the explanation. Instead, we just concentrated on what the two successive, identical, DWindowSet commands could be doing?

(E) EXPLANATION: RACE CONDITION CREATED

The two DWindowSet commands create a race condition between two popup desktop windows that lie exactly on top of each other.

eValid evidently finds the first one labeled "eValid" (because it has no title) and then marks it as found and handled by prepending "<eVPlay>" to its title.

But because the two windows are in the identically same location, because system response times are involved, some of the time the WRONG window is getting the transmitted keystroke. That's because the Windows desktop is a unitary resource and only ONE of the two windows can be "on top" at one time, and whichever one that is is the one that receives the keystroke. That's not going to be deterministic.

(F) LESSONS WE LEARNED

We really had to struggle with this question, but the lesson we learned at the end of the day [actually, learned again, to be completely honest] is that in some cases you need to work from understanding what eValid's commands DO first, before trying to compose them to accomplish some purpose for which they were not intended.

(G) RECOMMENDATION

Perform the required window synchronization with a Validate and Synchronize on Screen Rectangle action. Our records show that this was our original recommendation, and we believe if you follow it your script playback will be successful.

_________________
The eValid Team
eValid
 
Posts: 2399
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA

Re: Bug while playing back

Postby mssl » Tue Dec 21, 2010 3:06 am

Thank you guys for your detailed analysis. But I am tired of explaning.

We will not be able to use Validate Selected Window. For each and every script i have to capture the rectangale in validate selected rect methods. Also the message inside the pop-up box are not necessarly same always.

All I need to validate is whether a pop-up box comes when i give a wrong value in a textbox. Help us to do this.
mssl
 
Posts: 16
Joined: Tue Sep 07, 2010 8:51 pm

Re: Bug while playing back

Postby mssl » Tue Dec 21, 2010 5:07 am

Another problem is, the saved image never matches with that of runtime generated. Hope it is calculating pixels.
mssl
 
Posts: 16
Joined: Tue Sep 07, 2010 8:51 pm

Re: Bug while playing back

Postby eValid » Wed Dec 22, 2010 12:33 pm

mssl wrote:Thank you guys for your detailed analysis. But I am tired of explaning.

We will not be able to use Validate Selected Window. For each and every script i have to capture the rectangale in validate selected rect methods. Also the message inside the pop-up box are not necessarly same always.

All I need to validate is whether a pop-up box comes when i give a wrong value in a textbox. Help us to do this.

Thank you for your comments in response to our last detailed analysis.

eValid's goal is to try to support all and every possible testing solution, but unfortunately we have hit some unique combinations where eValid behavior may not be fully deterministic.

Unless there is a clear instance of eValid not working as it is designed to, we have to conclude that eValid is behaving as intended.

_________________________
The Support Team
eValid
 
Posts: 2399
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA

Re: Bug while playing back

Postby eValid » Wed Dec 22, 2010 12:38 pm

mssl wrote:Another problem is, the saved image never matches with that of runtime generated. Hope it is calculating pixels.

Without seeing/understanding the differences of your saved image(s) that are runtime generated, i.e. baseline vs. response, we are unable to provide any further possible tweaks. We can only add that you should apply what works best in accord with your testing results. And without access to your actual application, based on your manual script edits, we know already that you've applied "DWindowSet" with more success...

Perhaps trying to add "Wait #?" before clicking the ENTER key on pop-up window 1 and another "Wait #?" after closing will overcome the "race condition created" probabilities/effects and assure that window 2 is present for a PASSing playback results, as your "E.log on a day when this case was not successful" revealed. It appears to us that your comment about "We tried increasing wait time, but still we face issue" may not have been fully exhausted, i.e. included all possibilities and combinations...
eValid
 
Posts: 2399
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons