I want to validate session time out error messages in 9 different languages & for which time out is defined to be 15 mins. I dont have access to config files where I can reduce this time to speed up my testing.
Need help like what should be my approach to test this particular scenario.
I'd ask the developers for testable config files since your testing the message itself and not the passage of time. There is no other way to speed up a timeout value stated in a web.config file that I know of.
9 rows in your data table. Each row contains the expected message in whatever language.
The script iterates 9 times. It launches whatever it needs to, navigates to the proper screen where you want to wait for the timeout, then uses a Timer function to begin timing.
You check whether your timeout message exists, then loop, keep checking. When it does exist, break out of the loop and validate your Timer to see if it is 15 minutes (maybe withing 1-2% to allow for network lag if you wish) and validate your message.
<font class="small">Code:</font><hr /><pre>'put all the stuff you need to right here to get your application to right window/page/state where you expect to test the timeout.
intStartTime = Timer
var_Exist = "False" 'not really necessary but good coding standard
Do Until var_Exist = "True" or Now-intSTartTime > 1200
var_Exist = window().dialog("Error Popup").Exist(0)
intEndTime = Timer
If var_Exist = "True" Then
var_GetROProperty = window().dialog("Error Popup").GetROProperty("text")
If var_GetROProperty = DataTable("Message", dtLocalSheet) Then
Reporter.ReportEvent micPass, "Validate Timeout Error Message", "Expected: " & DataTable("Message", dtLocalSheet) & " and found: " & GetROProperty
Reporter.ReportEvent micFail, "Validate Timeout Error Message", "FAILED! Expected: " & DataTable("Message", dtLocalSheet) & " but found: " & GetROProperty
If intEndTime - intStartTime > 885 and intEndTime - intStartTime < 915 Then
Reporter.ReportEvent micPass, "Validate Timing of Timeout Message", "Timout message appeared in " & intEndTime - intStartTime & " seconds as expected."
Reporter.ReportEvent micFail, "Validate Timing of Timeout Message", "Timout message FAILED to appear in 15 minutes as expected. It actually took " & intEndTime - intStartTime & " seconds."
Reporter.ReportEvent micFail, "Timeout Error Message did NOT appear", "Waited 20 minutes and the Timeout Error Message FAILED to appear."
End If </pre><hr />
OK, I just spit that out, hopefully it's not too riddled with errors.