Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checking result of systemUtil.run
#1
Solved: 11 Years, 3 Months, 3 Weeks ago Question 
I use systemUtil.run to execute some applications or batch file.
I need to know the result of its execution if it fail or success.
However, systemUtil.run does not return any results.
any good idea?
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Try implimenting On Error Resume Next:

PHP Code:
On Error Resume Next
   SystemUtil
.Run("Batchfile")
   
MsgBox Err " " Err.Discription
On Error 
GoTo 
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Set a check point using the standard check point if its a window or dialog that launches. Then set check point parameter with a Boolean value pass or fail for qtp native reporter. That will validate pass or fail for you.
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks for your quick reply.
How does it implement using VBscript in QTP?
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Write a custom checkpoint to check if the application is opened or not.

Sample:

Code:
If Browser(..).Exist([TimeoutValue]) Then
msgbox "Application Opened successfully"

continue with your code...
Else
msgbox "Failed to open the application"
End If
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Another way is to "ECHO %errorlevel%" to a text file after each command in the batch mode and after the execution of batch file, open the text file and see if any errors are present.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation SystemUtil.run script is not generating while recording in qtp 9.5..pls help me senthil.kumar 0 2,573 01-24-2013, 02:09 PM
Last Post: senthil.kumar
  Syntax of SystemUtil.Run vijay.gupta 6 78,261 08-21-2012, 04:57 PM
Last Post: vinod123
  How to retrieve test result summary from a test result window using dp? jyotikrushna 3 5,268 09-30-2011, 09:24 AM
Last Post: rajpes
  Issue Regarding Email content checking kotaramamohana 0 2,696 01-05-2011, 10:49 AM
Last Post: kotaramamohana
  Checking text msg dynamically... Shandru 1 2,472 10-06-2010, 12:07 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)