SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Mar 2008
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Run Test Script From Userform

    Hello! I apologise if there is already posts detailing the solution to my questions, the back ground is as follows:

    I have a userform which displays a list box containing all my scripts in the project. When the user selects the required scripts, I would like to execute the scripts. As I want to execute the scripts from the form. I have seen a lot of solutions where you can run the form from the script, but I would prefer to do it the other way around so [img]/images/graemlins/shocked.gif[/img]I can choose a number of scripts to run in sequence. The ideal would be to run the form, and from the form execute the required scripts.

    I have the following code in my userform, but I think I am missing some vital syntax to make the test run efficiently:

    Dim TestPartnerApplication As TPApp
    Dim TestPartnerScriptList As TPScripts
    Dim TestPartnerScript As TPScript
    Dim TestPartnerProject As TPProject
    Dim Item As Long
    Dim i As Long
    Dim TestScriptResult As Boolean
    Dim ReturnValue As Double



    Set TestPartnerApplication = New TPApp
    Call TestPartnerApplication.Login("admin", "admin", , True)
    Set TestPartnerProject = TestPartnerApplication.Projects.Item("inTouch")
    Set TestPartnerScript = TestPartnerProject.Scripts.Item(1)

    frmTestSetup.Hide


    TestPartnerProject.Execute (TestPartnerScript.Name, -1, true, bstrPlaybackEnvironment)
    frmTestSetup.Show

    -----------------------------------------------------
    My main questions are:
    1.what is bstrPlaybackEnvironment used in the Execute command (Not sure what I should put in this)
    2. Is there a more efficient way to do this?
    3. How do I minimize Test Partner so that I can see the mouse clicks from the test.

    Your advice would be very much appreciated!
    Thanks

  2. #2
    Member
    Join Date
    Jul 2001
    Posts
    80
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Run Test Script From Userform

    I don't know about (1) but you can use the following to keep the form out of the way until the script finishes:

    Do
    DoEvents
    Loop Until TestPartnerApplication.PlaybackInProgress = False

    If you add this after the Hide line it will then wait for the script to finish executing before re-displaying the form.
    VB Tester

  3. #3
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Run Test Script From Userform

    You didn't say what version of TP you are using.

    For question 3, in TP 6.x, go to the Tools->Options screen. Under General, make sure that "Minimize on Playback" is set to yes.

    Regarding running scripts from a form - it looks like you are trying to set up a poor man's QADirector. QADirector will let you set up suites of scripts to run.

    Let me ask this - what is driving you to selecting multiple and different sets of scripts to run at different times? Maybe there is an alternative solution that doesn't need a form.

 

 

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 10.34%
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 10:21 AM.

Copyright BetaSoft Inc.