Rational Robot getting a screen dump on error


For the performance monitoring of the production environment we are using Rational Robot and ITCAM. I wanted to get a screen dump when a verification point in Rational Robot failed. This way I could see if there was an application issue or the screen was still waiting for the correct response hence a performance problem. In the past I called a routine that emulated the user actions of pressing screen print , opening paint, pasting the screen dump and then saving.  Then I found a .exe that I can call from VBA to do this for me. The program can be found at 1202Performance.

Here is an example of the routine to save it


   Dim sMonth As String
    Dim sDay As String
    Dim sTime As String
    Dim sDateTime As String
    Dim today
    if pstr_FileName = “” then
        pstr_FileName = “Unknown”
    end if
    ‘Calculate Time and Ammend to FileName
     today = Now
     if Month(today) < 10 then
         sMonth = “0” +Month(today)
         sMonth = Month(today)
     End if
     if Day(today) < 10 then
          sDay = “0” +Day(today)
          sDay = Day(today)
     End if
     sTime = Hour(today)*3600 + Minute(today)*60
     pstr_FileName = pstr_FileName + “_” + sMonth + “-” + sDay + “-” + sTime
     ‘Take a Screen Shot of Error using Scap.exe
     SQAShellExecute “c:\scap.exe”, “” , pstr_FileName & “_” & pstr_ScriptName
     Delayfor 10000


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s