Service Virtualization

Expand all | Collapse all

How do you run testrunner command from command line?

Jump to Best Answer

VirajSingh06-13-2016 05:02 AM

  • 1.  How do you run testrunner command from command line?

    Posted 06-13-2016 01:40 AM

    I tried running even the basic help command testrunner -h but it says that testrunner isnt a recognized command.

    I even tried running the testrunner.exe file in the LISA/bin folder but it exits without starting the service

    Do i need to set it up as an environment variable in windows?



  • 2.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 06-13-2016 03:30 AM

    What version of DevTest are you using? Can you open a windows shell and execute the command line utility as described below and provide the error results.

    Successful execution will print the help message as defined here.

     

    C:\DevTest\9.1.0\bin>TestRunner.exe -h

    Locale: en_US

    Setting System.out and System.err to: Cp1252

    00:16:41,129 DEBUG [main] OSUtils:280 - buildWindowsFriendlyPath - 17 About to get shortPath for C:\DevTest\9.1.0\

    00:16:41,172 DEBUG [main] DefaultLibraryLoader:61 - JAVA_VERSION = 8

    00:16:41,174 DEBUG [main] DefaultLibraryLoader:160 - DefaultLibraryLoader.generateTmpFolderName

    00:16:41,175 DEBUG [main] DefaultLibraryLoader:162 - classContainer = file:/C:/DevTest/9.1.0/lib/shared/jniwrap-3.8.4.jar

    00:16:41,178 DEBUG [main] DefaultLibraryLoader:164 - bundleVersion = 3.8.4

    00:16:41,179 DEBUG [main] DefaultLibraryLoader:232 - DefaultLibraryLoader.getJarName from the container: file:/C:/DevTest/9.1.0/lib/shared/jniwrap-3.8.4.jar

    00:16:41,179 DEBUG [main] DefaultLibraryLoader:166 - jarName = jniwrap-3.8.4

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

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

    00:16:41,230 DEBUG [main] DefaultLibraryLoader:377 - Finding library kernel32.dll

    00:16:41,231 DEBUG [main] DefaultLibraryLoader:439 - Finding library in system library path...

    00:16:41,257 DEBUG [main] OSUtils:305 - Length of longPath Str: 36

    LISA_HOME set to C:\DevTest\91FE54~1.0\

    Configuring logging from 'C:\DevTest\91FE54~1.0\logging.properties'

    DevTest Solutions, Copyright (c) 2002-2016 CA, All rights reserved.

    DevTest Test Runner - Stage and Execute Test Cases

    DevTest Solutions Version :: 9.1.0 (9.1.0.399)

    Installed patches: none

     

    USAGE:

            To execute a ModelARchive (mar, for tests or suites), use

                    TestRunner [options] [-mar | --mar] <marFile>

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

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



  • 3.  Re: How do you run testrunner command from command line?

    Posted 06-13-2016 03:41 AM

    I am using DevTest 8.4.0.

    i executed the above command and this is the error i got .

    The term 'D:\LisaSvr84\Lisa84\bin>TestRunner.exe' is not recognized as the name

    of a cmdlet, function, script file, or operable program. Check the spelling of

    the name, or if a path was included, verify that the path is correct and try a

    gain.

    At line:1 char:39

    + D:\LisaSvr84\Lisa84\bin>TestRunner.exe <<<<  -h

        + CategoryInfo          : ObjectNotFound: (D:\LisaSvr84\Lisa84\bin>TestRun

       ner.exe:String) [], CommandNotFoundException

        + FullyQualifiedErrorId : CommandNotFoundException

     

    Do i need to set the testrunner in my environment variables?



  • 4.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 06-13-2016 03:56 AM

    There is no need to set any environment variable if you are executing the command directly from the $LISA_HOME/bin directory. What is the home directory of the installation?  You should see the following executable in  $LISA_HOME/bin folder. Based on the error reported I am doubting if the path is correct.  Do you see other executable in that folder?

    In the example described below the LISA_HOME directory is  C:\DevTest\8.5.0

     

    C:\DevTest\8.5.0\bin>dir *.exe

    Volume in drive C has no label.

    Volume Serial Number is D648-50E6

     

    Directory of C:\DevTest\8.5.0\bin

     

    10/07/2015  12:34 AM          245,776 ATK.exe

    10/07/2015  12:34 AM          314,384 Broker.exe

    10/07/2015  12:34 AM          322,576 BrokerService.exe

    10/07/2015  12:34 AM          268,816 CoordinatorServer.exe

    10/07/2015  12:34 AM          277,520 CoordinatorService.exe

    10/07/2015  12:34 AM          268,816 CVSManager.exe

    10/07/2015  12:34 AM          313,872 EnterpriseDashboard.exe

    10/07/2015  12:34 AM          322,576 EnterpriseDashboardService.exe

    10/07/2015  12:34 AM          313,872 MakeMar.exe

    10/07/2015  12:34 AM          313,872 PFAdapter.exe

    10/07/2015  12:34 AM          314,384 PFCmdLineTool.exe

    10/07/2015  12:34 AM          263,696 Portal.exe

    10/07/2015  12:34 AM          277,520 PortalService.exe

    10/07/2015  12:34 AM          269,328 Registry.exe

    10/07/2015  12:34 AM          277,520 RegistryService.exe

    10/07/2015  12:25 AM            93,184 sendsignal.exe

    10/07/2015  12:34 AM          313,872 ServiceImageManager.exe

    10/07/2015  12:34 AM          268,816 ServiceManager.exe

    10/07/2015  12:34 AM          269,328 Simulator.exe

    10/07/2015  12:34 AM          277,520 SimulatorService.exe

    10/07/2015  12:34 AM          313,872 TestRunner.exe

    10/07/2015  12:34 AM          268,816 VirtualServiceEnvironment.exe

    10/07/2015  12:34 AM          277,520 VirtualServiceEnvironmentService.exe

    10/07/2015  12:34 AM          268,816 VSEManager.exe

    10/07/2015  12:34 AM          269,328 Workstation.exe

                  25 File(s)      6,985,600 bytes

                  0 Dir(s)  76,700,577,792 bytes free



  • 5.  Re: How do you run testrunner command from command line?

    Posted 06-13-2016 05:02 AM

    Thank you for your help in debugging



  • 6.  Re: How do you run testrunner command from command line?

    Posted 04-19-2017 08:15 PM

    Hi Ashutosh,

     

    I am trying to run testrunner with mar file. But I am getting the exist code 255 <Internal Error>. I am giving below command in the CMD

    C:\DevTest9.0\bin>     TestRunner -a -u test-p test -mar C:\Tests\Suites\AllTestsSuite.mar -m tcp://<servername>/Registry -config C:\Test\Configs\project.config

     

    Can you please confirm if anything wrong with above command line? I believe 255 refers to BAD PARAMETERS in the command line

     

    I am getting below as the response whenever I execute this command line

    Locale: en_US
    Setting System.out and System.err to: Cp1252
    LISA_HOME set to C:\DevTest9.0\bin
    DevTest temporary directory is C:\lisatmp_9.0.0
    Configuring logging from 'C:\DevTest9.0\bin\logging.properties'
    DevTest Solutions, Copyright (c) 2002-2017 CA, All rights reserved.
    DevTest Test Runner - Stage and Execute Test Cases
    DevTest Solutions Version :: 9.0.0 (9.0.0.297)
    Installed patches: none

    USAGE:
    To execute a ModelARchive (mar, for tests or suites), use
    TestRunner [options] [-mar | --mar] <marFile>

    To execute a single test
    TestRunner [options] [-t | --testCase] <TestCaseDocName>

    To stage a test suite
    TestRunner [options] [-s | --testSuite] <SuiteDocName>

    OPTIONS:
    To specify the TestRegistry to use
    -m <TestRegistryName> | --testRegistry <TestRegistryName>

    To specify the Coordinator to use
    -cs <CoordinatorServerName> | --coordinatorService <CoordinatorServerName>

    (To stage locally, specify neither a Coordinator nor a TestRegistry)

    To specify the Lab to use
    -l <LabName> | --labName <LabName>

    To specify the Staging Document to use
    -r <StagingDocName> | --stagingDoc <StagingDocName>
    (defaults to 1 user, 1 cycle, 100% think time, default reporting)

    To specify the Configuration to use
    -config <configurationFileName> | --configFile <configurationFileName>

    To auto-start the test so you do not have to hit [ENTER]
    -a | --autoStart

    To write an HTML report (not supported for test suites)
    -html <reportFileName> | --html <reportFileName>

    To change the update interval from the default of 5 seconds
    -i <NumberOfSeconds> | --interval <NumberOfSeconds> | --update <NumberOfSeconds>

    To pass user credentials to a security enabled system, provide both username and password options
    -u <username> | --user <username> and -p <password> | --password <password>

    To output the version number
    --version

    To print this usage message
    -h | --help

    RETURN CODES:
    0 : all tests passed
    1..n : n tests failed (up to a max of 250)
    253 : License failure
    254 : No TestRegistry found
    255 : Bad parameters

    EXAMPLES:
    Run the multi-tier-combo test with the default 1-user, 1-time staging document:
    TestRunner -t LISA_HOME/examples/Tests/multi-tier-combo.tst

    Run the suite AllTestsSuite locally:
    TestRunner -s LISA_HOME/examples/Suites/AllTestsSuite.ste

    Run the suite AllTestsSuite on a TestRegistry running on another machine (the registry will assign a cooor server>
    TestRunner -s LISA_HOME/examples/Suites/AllTestsSuite.ste -m somemachine/Registry
    Config file and MAR file are mutually exclusive options.

    Exiting with exit code 255 (INTERNAL ERROR)

     

    Appreciate your help!

     

    Thanks,

    Nikhil



  • 7.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-19-2017 09:04 PM

    From the response you can see the following

     

    Config file and MAR file are mutually exclusive options.

     

    So try to execute the following

     

    TestRunner -a -u test -p test -mar C:\Tests\Suites\AllTestsSuite.mar -m tcp://<servername>/Registry



  • 8.  Re: How do you run testrunner command from command line?

    Posted 04-19-2017 10:18 PM

    Thanks alot, Prem. It works now! But I am facing another issue. It throws below exception when i ran TestRunner comman

     

    Exception JMS Messaging problem with ServerRequestHandler for tcp://PXXXXXXXXXV:2011/Coordinator Could not connect to broker URL:tcp://PXXXXXXXXXXV:2011?wireFormat.maxInactivityDuration=0. Reason: java.net.UnknownHostException: PXXXXXXXXXXV; nested exception is: 

     

    I am not which host is this PXXXXXXXXXV (masked with "X"). I was using a different registry url, but somehow it is going to this unknown host and failing my test.

    Any idea on this?

     

    Thanks,

    Nikhil



  • 9.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-19-2017 10:39 PM

    PXXXXXXXXXV is the host where the Coordinator is running. Looks like your workstation (the machine where you are running your TestRunner) is not able to resolve it to the IP of the Coordinator.

     

    If you have access to PXXXXXXXXXV server running the Coordinator - get the IP of the same - otherwise  Please get the same from your DevTest admin.

     

    Make an entry in your %SystemRoot%\System32\drivers\etc\hosts file like below where <IP of Coordinator> is the IP of your Coordinator Server

     

    <IP of Coordinator>    PXXXXXXXXXV         # Coordinator server

     

    Retry after adding the above.



  • 10.  Re: How do you run testrunner command from command line?

    Posted 04-19-2017 10:43 PM

    Sure thanks alot, Prem. I will try with the same,

     

    Thanks,

    Nikhil



  • 11.  Re: How do you run testrunner command from command line?
    Best Answer

    Posted 06-13-2016 04:11 AM

    Looks like you are trying to call testrunner from Windows Powershell. Try './testrunner.exe -h' instead.



  • 12.  Re: How do you run testrunner command from command line?

    Posted 06-13-2016 05:02 AM

    Thank you . It worked



  • 13.  Re: How do you run testrunner command from command line?

    Posted 04-18-2018 06:38 PM

    Hi Team,

     

    Could you please let me know the command to run testrunner in unix box



  • 14.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-19-2018 09:59 AM

    Bala,

     

    This link is with DevTest 10.3.0, but it will be the same on all releases:

     

    Test Runner - DevTest Solutions - 10.3 - CA Technologies Documentation 

     

    On UNIX, Test Runner is available as a UNIX executable, TestRunner, in the LISA_HOME/bin folder.

     

    To display help information for Test Runner, use the -h or the --help option.

     

    ./TestRunner --help

     

    Hope this helps.

     

    ~Marcy



  • 15.  Re: How do you run testrunner command from command line?

    Posted 04-19-2018 10:55 AM

    Hi Marcy,

     

     

    Thanks for your document,we tried and working fine.As suggested in below document we tried for report generation as below but we are getting blank report.Do we need to set any parameters for proper html report?

     

     

    TestRunner.exe -m tcp://vse.mcdecp.datapipe.net/Registry -u MC59496 -p Qwerty1234 -t C:\Users\MC59496\Documents\DevTest\DevTest\Projects\QEPS\Tests\SET-545-FIDDLER-27600017-1_413.tst -html C:\Users\MC59496\Documents\DevTest\DevTest\Projects\QEPS\Tests\MyReport.html

     

     

    Thanks,

     

    Bala Subrahmanyam.T



  • 16.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-19-2018 02:33 PM

    Bala,

     

    What version of DevTest are you using?

     

    ~Marcy



  • 17.  Re: How do you run testrunner command from command line?

    Posted 04-19-2018 02:54 PM

    Hi,

     

     

    We are using CA Dev Test 10.3



  • 18.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-19-2018 06:21 PM

    I will test this on my machine and let you know my results.



  • 19.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-19-2018 06:47 PM

    Bala,

     

    I am able to see a report to my html.

     

    This is my TestRunner command, I am using the DemoServer to test with:

     

    C:\CA\DevTest10.3.0\bin>Testrunner.exe -t C:\CA\DevTest10.3.0\examples\Tests\multi-tier-combo.tst -r C:\CA\DevTest10.3.0\examples\StagingDocs\Run1User1Cycle.stg -config C:\CA\DevTe
    st10.3.0\examples\Configs\project.config -html C:\CA\DevTest10.3.0\examples\MyReports\BalaTest.html -m tcp://MYSERVER:2010/Registry -u admin -p admin -a

     

    My test Report:  (I had to create the folder I am putting the html file)

     



  • 20.  Re: How do you run testrunner command from command line?

    Posted 04-20-2018 09:36 AM

    Hi Marcy,

     

     

    Thanks for your help,I tried the similar command and getting below error.Unable to stage the test.Do I need to change any settings for stage test?

     

     

    Is possible can we connect on webex for 15 mins to sort out the issue.

     

     

    Failed to stage or start test/suite

    Failed to stage test!Failed to stage test!

     

     

    ============================================================================

    | Exception:

    ============================================================================

    | Message:     Failed to stage test!



  • 21.  Re: How do you run testrunner command from command line?

    Broadcom Employee
    Posted 04-20-2018 05:59 PM

    Bala,

     

    Please open a support case. 

     

    Regards,

    Marcy