SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Sep 2005
    Location
    Gainesville
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Reading data from a TSP file?

    Okay, so here goes:

    I am developing an application that will programmatically run through a file structure and find all test scripts in that file structure, collecting information about the directory tree, test scripts and associated actions.

    Trouble is, a lot of the information needed is trapped in the TSP file of a test script. This file is not very friendly with typical text editors - it only reads well enough for me to know that this is the file that contains all the information about the settings of a test script.

    Does anyone know of a way to effectively read the TSP file? I am having the same issue with MTR files.

    Thanks!

  2. #2
    Junior Member
    Join Date
    Sep 2005
    Location
    Gainesville
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading data from a TSP file?

    As a sidenote, I do realize you can export the test script settings into a VBScript file from QTP...

  3. #3
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading data from a TSP file?

    Can you use the AOM to interrogate the tests settings, something like this:

    '===============================================
    Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
    Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
    Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable

    Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
    qtApp.Launch ' Start QuickTest
    qtApp.Visible = True ' Make the QuickTest application visible

    ' Set QuickTest run options
    qtApp.Options.Run.CaptureForTestResults = "OnError"
    qtApp.Options.Run.RunMode = "Fast"
    qtApp.Options.Run.ViewResults = False

    qtApp.Open "C:\Tests\Test1", True ' Open the test in read-only mode
    ' get test settings info
    MsgBox App.Test.Settings.Launchers("Web").Address
    '===========================================

    You could run this for each test, extract the test settings (I'm using MsgBox just as a demo) and write them out to a file or spreadsheet.

    Mark Smith.

  4. #4
    Junior Member
    Join Date
    Sep 2005
    Location
    Gainesville
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading data from a TSP file?

    I get ya. Now that you've got me thinking, what I may do is use the Settings Object that's native to QTP and design a function that will collect all of the running test's settings and send them to an xml file.

    Include the function in every script and then every time a script is run it'll create (replace) a nifty xml file in the test's directory and the xml file will just tag along with the test wherever the test goes.

    Good deal, thanks!

  5. #5
    Senior Member
    Join Date
    Oct 2002
    Location
    Federal Way, WA
    Posts
    756
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reading data from a TSP file?

    Don't forget to make it work in reverse to so that you can read out of an xml file and stick it into TD.

    MArk B.
    If you're a slave to your free associations, does it automatically become something else?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:54 PM.

Copyright BetaSoft Inc.