Ultimatetimepass logo

  • Home
    • QuickTest
      • Webbased
        • Close Opened Browsers Except QC
        • open/ launch a new session of IE
        • GET COUNT AND NAMES OF ALL OPEN BROWSERS
        • Get No of links in a page- Descriptive programming
        • Function to click on menu (Mimic the user action)
        • Function to display type ahead list in a dropdown
        • Drag and Drop the files into application
      • XML
        • Read XML
        • Create XML
        • Merge 2 XML
      • Excel
        • Read Excel using ADODB connection
        • Delete Columns from excel sheet
        • Delete Rows From excel sheet
        • Excel Sorting
        • Save as a Password Protected Excel sheet
        • Open a Password Protected excel and save as unprotected
        • Find a value in Excel Sheet
        • Create and update a excel File at given path
        • To Query a Excel Sheet as a database
      • VBScript
        • To type keyboard input onto the open window
        • Send or Type a key on the application using wscript.shell
        • Set a default Printer
        • To Verify an Application launch
        • Verify and delete a file to a specific location
        • Create MS Word, Edit and Print a blank page
        • Create a MS Access(.mdb) database file
        • Import a XML file to MS Access database
        • Connect to SQL Server
        • Connect to MS Access DB
        • Create a Text File at given path
        • Read a text file and store data in a variable
        • Get number of pages in pdf
    • VBScript
      • Generate a chart in excel
      • Map a netwrok drive
      • Retrieve computer operating system name
      • Kill a task manager process
      • Make a message alert with ding sound using Microsoft Office assistant popup
      • Include a functional library or any other VBscript code available in your current script
    • TestPartner
      • Launch TestPartner from VBscript or any other tool
    • Software Risk Management
    • Software Testing Estimation Techniques
    • Capability Maturity Model Integration (CMMI)
    • Test Policy, Test strategy ,Test Plan
    • Load Testing
      • Load Test Test Plan
      • Performace, Load and Stress test
  • Contact US
  • Privacy Policy

Launch TestPartner from VBscript or any other tool

  • Print
  • Email

' VB Script Document
option explicit
To launch TestPartner from VBscript or any other tool, use following code:
Steps:
1) Create a TestPartner application

2) Login to Testpartner

3) Make TestPartner visible

4) Connect to a Project

5) Open a script and execute

6) Wait until testpartner is executing script

7) Check results

8) Stop script.


        Dim tp 'As testpartner Object
        Dim proj 'As project Object
        Dim scr 'As script Object
         Dim Username, Password, Databasename, Projectname , Scriptname

'1) Create a TestPartner application
'
       Set tp = CreateObject("TestPartner.Application") 'create an instance of TestPartner

'2) Login to Testpartner

        tp.Login Username, Password, Databasename, True    'provide TestPartner login, password and database name details
'3) Make TestPartner visible'
        tp.show() 'show TestPartner App

'4) Connect to a Project'
        Set proj = tp.Projects.Item(Projectname) 'select project

        tp.show()

'5) Open a script and execute'
        Set scr = proj.Scripts.Item(Scriptname) 'select script

        scr.Open() 'open script

        scr.Execute() 'execute script
 
 '6) Wait until testpartner is executing script
        ' check every second if script is still running
        While tp.PlaybackInProgress

        Wend

'7) Check results
        ' show script result in a message box
        MsgBox(tp.LastResult.ChecksPassed & "/" & tp.LastResult.ChecksExecuted)

'8) Stop script.'
        tp.stop()