Service Virtualization

  • 1.  Facing error with DevTest TestRunner -mar option

    Posted Apr 19, 2017 08:18 PM

    Hi,

     

    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 any help!

     

    Thanks,

    Nikhil



  • 2.  Re: Facing error with DevTest TestRunner -mar option
    Best Answer

    Broadcom Employee
    Posted Apr 19, 2017 08:49 PM

    Hello Nikhil,

     

        Please execute mar file using testrunner as below to resolve your issue:

    TestRunner -a -u test -p test -mar C:\Tests\Suites\AllTestsSuite.mar -m tcp://10.131.46.114:2010/Registry

       *) Add space after -u test (change -u test-p test to -u test -p test)

       *)  And no need to config parameter when you are running mar file. Because mar file includes config file and staging doc details.

       

    Hope, I have answered your query.

     

    Thanks

    Srikanth 



  • 3.  Re: Facing error with DevTest TestRunner -mar option

    Posted Apr 19, 2017 10:15 PM

    Thanks alot, Srikanth. It works now! But I am facing another issue. It throws below exception while running the commandline

     

    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



  • 4.  Re: Facing error with DevTest TestRunner -mar option

    Broadcom Employee
    Posted Apr 19, 2017 10:49 PM

    I think this is duplicate question. Please confirm once you have tried the suggestion mentioned at

     

    https://communities.ca.com/message/241973624?commentID=241973624&et=watches.email.thread#comment-241973624 



  • 5.  Re: Facing error with DevTest TestRunner -mar option

    Posted Apr 19, 2017 11:06 PM

    Sure I will do. Thanks Prem.



  • 6.  Re: Facing error with DevTest TestRunner -mar option

    Posted Apr 21, 2017 06:49 PM

    Thanks alot Prem. It worked for me. I tried the same way you suggested. Thank you so much.

    However I am facing another issue. My script will update and create a new file. Though I am getting SUCCESS with TestRunner command, I am not seeing the XL file updation and creation are not happening. In the logs, I see all the assertions are passed. Could you please help on this too?

     

    I used to save file in C:\Documents\myProject\Automation\testReport.xlsx

     

    Thanks,

    Nikhil



  • 7.  Re: Facing error with DevTest TestRunner -mar option

    Broadcom Employee
    Posted Apr 21, 2017 06:58 PM

    Do you have access to the simulator server/s which is configured in the staging document ?

     

    Depending on your DevTest server components, the executed test will try to create testRepose.xlsx file under C:\Documents\myProject\Automation\ folder of the simulator server where the test runs.

     

     



  • 8.  Re: Facing error with DevTest TestRunner -mar option

    Posted Apr 21, 2017 07:31 PM

    Oh ok! No I do not have access to server. I am trying to access remotely from my desktop through registry.Only very restricted permissions i have.

    Is there any way to create the report in my local workstation after executing TestRunner command.

     

    Thanks,

    Nikhil



  • 9.  Re: Facing error with DevTest TestRunner -mar option

    Broadcom Employee
    Posted Apr 21, 2017 10:56 PM

    Unfortunately no.

     

    If you have access to a smtp server from the simulator server - you could potentially add a test case which is executed at the end - which has a Send Email Step - attaching C:\Documents\myProject\Automation\testReport.xlsx & email it to yourself / list of people you need to send the report to.