Ask a Question

Need VB Script load testing

mid
Not applicable

Need VB Script load testing

Hi,



I created a HTTP load test using test complete. It has 3 scripts:

1. the recorded load test scenario.

2. export the log to local hard drive.

3. send a mail to the user with the log file.

These scripts runs fine and shows the result as expected.



Now, I would like to add a condition in the code (or anywhere its possible), such that: if the task execution time is more than 10 seconds, then an alert/warning message should be shown in the result log and an email should be send to the user.



I tried working with Web Service Checkpoints to accomplish this, even though I wasn't sure if it'll help. But got stuck up while specifying the web service for testing, as I couldn't get the WSDL document/url.



I'd really appreciate if someone can create the required vb scripts and share it. Thanks a lot in advance.
Thanks,
Mid
1 REPLY 1
AlexanderM
Staff


Hello Midhun,





If I get the task correctly, you just need to measure your load test execution time, and check it later. I would do this in the following way:







  Set SW = HISUtils.StopWatch

  SW.Start

  TestInstance.Run("My load test")  

  RunTime = SW.Stop

  If RunTime > 10000 Then

    ' Send an E-mail 

  End If

-----

Alexander
Customer Care Manager
cancel
Showing results for 
Search instead for 
Did you mean: