Forum Discussion

mikev's avatar
mikev
Contributor
13 years ago

Probably Stupid question - Command-line confusion

I'm a little bit confused I suppose about the command-line as it relates to Test Items.



I have a Project Suite (Suite), a Project (AR), and I two Test items (Test1 & Test2) for the project.



Since I'm planning on running my tests via Jenkins, I needed to come up with a command-line script to run the tests.





I thought I could do something like this to run ALL tests in the Suite:

Code:

"C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "<myPath>\Suite.pjs" /r /e /SilentMode







I thought I could do something like to to run ALL tests in a specific project:

Code:

"C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "<myPath>\AR.mds" /r /e /SilentMode







I thought I could do this for an individual test:

Code:

"C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "<myPath>\AR.mds" /t:"Script|Test1" /r /e /SilentMode







And another individual test in the same project:

Code:

"C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "<myPath>\AR.mds" /t:"Script|Test2" /r /e /SilentMode







Well, when I ran the individual test script, BOTH tests were run, and that's not what I expected or want.



I've read the help, and based on that, I thought what I have would work, but it doesn't.



Oh, and as a side "problem", in the Tools->Options->Engines->Log I have deselected "Activate after test run",

but
when I run the above remotely using Test Execute, the results still are
displayed. I don't want results displayed automatically.



Pointers?
  • chicks's avatar
    chicks
    Regular Contributor
    I haven't used the "t" option as in your examples.  However, I have used the /unit and /routine switches to run individual functions inside my scripts....



    start /wait "TestExecute" "C:\Program Files\Automated QA\TestExecute 8\Bin\TestExecute.exe" "C:\TestCompleteFiles\testcomplete\Shell_Member_Portal_suite\Shell_Member_Portal_suite.pjs" /p:MemberPortal /unit:prototypes /routine:cause_hanging_ie /r /e /data="C:\TestData\MP_Shell_QA_Box.xlsx"
  • I'll give that a try Curt, thanks.  The "t" option was in the Help, that's where I got it.
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Mike,



    You're missing the /p argument and the unit name in the /t argument. So it should be:

    --------------------------------------------------------------------------------

    "C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "<myPath>\AR.mds" /p:AR /t:"Script|UnitName|Test1" /r /e /SilentMode

    --------------------------------------------------------------------------------



    Alternatively, you can use the /p, /unit and /routine arguments as in Curt's example.



    Oh, and as a side "problem", in the Tools->Options->Engines->Log I have deselected "Activate after test run",

    but when I run the above remotely using Test Execute, the results still are displayed. I don't want results displayed automatically.
    You need to disable this option in TestExecute as well: right-click on the TestExecute icon in the system tray, go to Options > Engines > Log and deselect Activate after test run.
  • Thanks folks, I got it working.   Appreciate the help.