Debugging not working with UFT 11.5

I am using  UFT 11.50 on my machine. when i launch UFT using a vbscript(Script is mentioned below)  and If I add a break point in my script and run it, execution is not stopping at the break point. Also, I see that "Step Over", "Step Out" and "Stop" icons are disabled.

And if i run normally then breakpoint will be enabled!

Could you please let me know how to fix this?

 

 

Dim qtApp
Dim qtTest
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.Open "C:\test\QTP\Automated Regression Scripts\Regression_MasterScript", True
Set qtTest = qtApp.Test
qtTest.Run
qtTest.Close
qtApp.Quit

Parents
  • If debugging is the main purpose here, then I am wondering about using an AOM script. Normally one would use AOM scripts to run UFT scripts.

    Anyways, you could try setting the run mode to Normal. 

    qtApp.Options.Run.RunMode = "Normal"

  • Hi Rajkumar,

    I tried setting "qtApp.Options.Run.RunMode = "Normal" but still  "Step Over", "Step Out" and "Stop" icons are disabled.

    Debugging isnt my main purpose here!

    Let me explain problem clearly!

    As mentioned in the question i am using a vbs file to launch UFT and run scripts,but when i run using vbs file, most of my test condtions shows as failure!

    but if i open QTP manually and  apply breakpoint before checkpoints/test conditions and run then  same scripts works fine and most of test condtions shows success!

    i thought its because of synchronous issue so i increased the explicite wait and tried but still the results were same!

    while analysing the cause for these failure i found that when i run UFT using vbscript then "Step Over", "Step Out" and "Stop" icons will be disabled where as these will be enabled when i run UFT manually!

    and i had a assumption that if i enable these icons while triggering UFT from VBscript then my test cases might work so asked this question to find a way to enable these icons!

    Hope u got a clear picture of my problem!!

  • Hi Basava,

    I get the full picture now.  So we can start with the issue and not the fix.

    Can you post the code for your 'Test Conditions' , where it fails? 

    Another thing I can think of is 'Add-ins' that are loaded when you run via AOM vs when run manually? Can you confirm if they are the same?

     

  • Below is one of the sample test condtion/checkpoint which fails! there are many such test condtions!

    I am using text checkpoint,text area,bitmap checkpoints to verify the test conditions!

    to explain briefly what does the Below code do, it will select input source and state like progress,inprogress etc and then run the filter which will give the output which will be compared with already recorded expected value "Results - Custom Filter'" (text checkpoint)

     

    Call fn_BodyDR("info","Checking the initial number of alert and cases for all the case sources'")'Check the no of cases and alerts for each source
    JavaWindow("Case Management").JavaObject("FilterTab").Click 21,15,"LEFT"
    JavaWindow("Case Management").JavaButton("collapsed").Click
    wait 1
    Call fn_BodyDR("info","Reporting with filter set to Source Name and Current State'")
    JavaWindow("Case Management").JavaList("Columns").Select "Source Name"
    JavaWindow("Case Management").JavaList("Rows").Select "Current State"
    JavaWindow("Case Management").JavaButton("RunFilter").Click
    JavaWindow("Case Management").JavaButton("expanded").Click
    wait 10
    If  JavaWindow("Case Management").JavaEdit("Results - Custom Filter").Check (CheckPoint("Results - Custom Filter")) Then
        
        Call fn_BodyDR("Pass","The consolidated  filter results for the CaseSources is correct")
        
    Else
        Call fn_BodyDR("fail","The consolidated  filter results for the CaseSources is incorrect")
        numreturn = -1
    End If


    Call ValidateError(numreturn)

     

    if i run manually by applying breakpoint before if condition and check then pass condition will execute and test case will be marked as passed,and if i run using vbscript then else part i.e. fail condition will execute and test case will be failed!

     

  • In between,i am not using my UFT generated AOM!

    The vbscript code mentioned in the question,i found it in google and i just made parameter changes to run my UFT! so i am not sure what and all add-in it will select! 

    and my application is GUI based application(Java swing) and it contains some webpages  from where i launch this swing application!! so i usually select Java and web add-in to run my scripts!

  • In between,i am not using my UFT generated AOM!

    The vbscript code mentioned in the question,i found it in google and i just made parameter changes to run my UFT! so i am not sure what and all add-in it will select! 

    and my application is GUI based application(Java swing) and it contains some webpages  from where i launch this swing application!! so i usually select Java and web add-in to run my scripts!

  • When you run directly from UFT, does it Pass, without inserting a Checkpoint?

Reply Children