• RSS
  • Facebook
  • Twitter

One Center for all the Testing Need. OneTestingCenter is for all, for all QA, for all Automation. Automation is easy, fun and enriching experience. Happy Learning and Happy Testing!

  • Access to All QA

    At OneTestingCenter, you find lots of books,articles,blogs and detailed guides. Everyone has access to QA. Happy Learning, Happy Testing.

  • Global Trainings

    All the QA/Auotmation trainings are available at OneTestingCenter. QA, Automation, QTP/UFT, Selenium, LoadRunner, QC/ALM, Appium...

  • Automation Learning Fun

    Technology is always evolving. Automation is always challenging. To be frank, Automation is fun, enthusiastic and enrching experience.



    'Automation Object Model

    '*******************************************************************
    '******************************************************************* 
    ' GAReddy @ OneTestingCenter @ QTP - AOM (Automation Object Model)
    ' What ==>  This is a QTP - AOM Script to Open QTP , To Open Driver Script (To Open Existing Script ) and to Run the Test
     ' and store the results on to specified results directory (using the Run options)
    ' How ==> Need QuickTest.Application Automation Object to do so
    ' Why ==> To Open a Driver Script (which could call other tests) and to Run Automatically
    ' Author : GAReddy @ OneTestingCenter @ QTP
    '******************************************************************
    '****************************************************************** 

    Dim oQTP 
    Dim QTPTest  
    Dim QTPResultsOptions 
     
    Set oQTP = CreateObject("QuickTest.Application") ' Create the Application object 
    oQTP.Launch ' Start QuickTest 
    oQTP.Visible = True ' Make the QuickTest application visible 
     
    ' Set QuickTest run options 
    oQTP.Options.Run.ImageCaptureForTestResults = "OnError" 
    oQTP.Options.Run.RunMode = "Fast" 
    oQTP.Options.Run.ViewResults = False 
     
    oQTP.Open "D:\GAReddy\OneTestingCenter\QTP\AprilBatch\KeywordDrivenFramework\TestScripts\DriverScript", True
    ' Open the test in read-only mode 
     
    ' set run settings for the test 
    Set QTPTest = oQTP.Test 
     
    QTPTest.Settings.Run.OnError = "NextStep"
    ' Instruct QuickTest to perform next step when error occurs 
     
    Set QTPResultsOptions = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object 
    QTPResultsOptions.ResultsLocation = "D:\GAReddy\OneTestingCenter\QTP\AprilBatch\KeywordDrivenFramework\TestResults\Res1"
    ' Set the results location 
     
    QTPTest.Run QTPResultsOptions ' Run the test 
     
    MsgBox QTPTest.LastRunResults.Status ' Check the results of the test run 
    QTPTest.Close ' Close the test 
     
    Set QTPResultsOptions = Nothing ' Release the Run Results Options object 
    Set QTPTest = Nothing ' Release the Test object 
    Set oQTP = Nothing ' Release the Application object  

    '*********************************************************************
    '*********************************************************************
    Reactions:

    QTP - AOM - Open Driver Sctipt - Run Tests - Save Results



    'Automation Object Model

    '*******************************************************************
    '******************************************************************* 
    ' GAReddy @ OneTestingCenter @ QTP - AOM (Automation Object Model)
    ' What ==>  This is a QTP - AOM Script to Open QTP , To Open Driver Script (To Open Existing Script ) and to Run the Test
     ' and store the results on to specified results directory (using the Run options)
    ' How ==> Need QuickTest.Application Automation Object to do so
    ' Why ==> To Open a Driver Script (which could call other tests) and to Run Automatically
    ' Author : GAReddy @ OneTestingCenter @ QTP
    '******************************************************************
    '****************************************************************** 

    Dim oQTP 
    Dim QTPTest  
    Dim QTPResultsOptions 
     
    Set oQTP = CreateObject("QuickTest.Application") ' Create the Application object 
    oQTP.Launch ' Start QuickTest 
    oQTP.Visible = True ' Make the QuickTest application visible 
     
    ' Set QuickTest run options 
    oQTP.Options.Run.ImageCaptureForTestResults = "OnError" 
    oQTP.Options.Run.RunMode = "Fast" 
    oQTP.Options.Run.ViewResults = False 
     
    oQTP.Open "D:\GAReddy\OneTestingCenter\QTP\AprilBatch\KeywordDrivenFramework\TestScripts\DriverScript", True
    ' Open the test in read-only mode 
     
    ' set run settings for the test 
    Set QTPTest = oQTP.Test 
     
    QTPTest.Settings.Run.OnError = "NextStep"
    ' Instruct QuickTest to perform next step when error occurs 
     
    Set QTPResultsOptions = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object 
    QTPResultsOptions.ResultsLocation = "D:\GAReddy\OneTestingCenter\QTP\AprilBatch\KeywordDrivenFramework\TestResults\Res1"
    ' Set the results location 
     
    QTPTest.Run QTPResultsOptions ' Run the test 
     
    MsgBox QTPTest.LastRunResults.Status ' Check the results of the test run 
    QTPTest.Close ' Close the test 
     
    Set QTPResultsOptions = Nothing ' Release the Run Results Options object 
    Set QTPTest = Nothing ' Release the Test object 
    Set oQTP = Nothing ' Release the Application object  

    '*********************************************************************
    '*********************************************************************