Jump to content
Sign in to follow this  
Desi

How to detect Exception in stress test

Recommended Posts

Desi

Hi,

My question is related to software testing. Suppose we have a sample application under stress test with AutoIt.

Now let say an exception occurs in that application in terms of Message Box etc.

My question is how can we detect this unexpected behavior.

Thanks in advance

Share this post


Link to post
Share on other sites
water

Use winlist to get a list of all windows. Check the list for allowed windows and react on the other windows appropriate.

This could be run in a separate script or enabled via AdlibRegister in the stress testing script.

The example for Winlist in the help file shows how to limit the number of windows to visible ones.

My 2 cents.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Desi

Use winlist to get a list of all windows. Check the list for allowed windows and react on the other windows appropriate.

This could be run in a separate script or enabled via AdlibRegister in the stress testing script.

The example for Winlist in the help file shows how to limit the number of windows to visible ones.

My 2 cents.

Thank you very much. I would try to use with OnEvent.

Best Regards

Share this post


Link to post
Share on other sites
Desi

Use winlist to get a list of all windows. Check the list for allowed windows and react on the other windows appropriate.

This could be run in a separate script or enabled via AdlibRegister in the stress testing script.

The example for Winlist in the help file shows how to limit the number of windows to visible ones.

My 2 cents.

I have tried your solution but WinList is giving list of all windows instead of windows related to my application. So that does not work. Can you please suggest me anything else?

Share this post


Link to post
Share on other sites
water

What is common to all Windows and Messages Boxes belonging to your application?

The same title (as a whole or in parts)? The same text somewhere in the Window?

If yes then WinList can filter on the window title or text.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Desi

What is common to all Windows and Messages Boxes belonging to your application?

The same title (as a whole or in parts)? The same text somewhere in the Window?

If yes then WinList can filter on the window title or text.

Unfortunately there is nothing common between window titles, all windows have different title text.

Share this post


Link to post
Share on other sites
water

So how do you know which windows/message box does belong to your application?

If you don't know, how should the script know?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Desi

So how do you know which windows/message box does belong to your application?

If you don't know, how should the script know?

The only common thing between all windows is their class name. All classes starts with "TAPP".

Share this post


Link to post
Share on other sites
water

Fine, then you can use:

#include <array.au3>
$aWL = WinList("[REGEXPCLASS:TAPP]")
_ArrayDisplay($aWL))

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Desi

Fine, then you can use:

#include <array.au3>
$aWL = WinList("[REGEXPCLASS:TAPP]")
_ArrayDisplay($aWL))

Thanks buddy. Now It's working. Great help from you.

Cheers

Share this post


Link to post
Share on other sites
water

Glad to be of service.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×