Service Virtualization

 View Only
Expand all | Collapse all

command line execution to run the scripts locally

  • 1.  command line execution to run the scripts locally

    Posted May 30, 2018 08:43 PM

    Hi All

    I am using the below command to run the scripts , but scripts getting executing referring the server hot deploy folder

     

    How can I make my script to run scripts to refer local hot deploy artifacts through command line execution 

     

    I have additional jars placed locally , so need help running the scripts through command line referring local jars

     

    TestRunner.exe -u userid -p password-t "C:\DevTestProjectWorkSpace\Unifi\Tests\MOBO-LoanCreationTestCases\MOBO_WithoutBorrower.tst" -m tcp://*****/Registry -a -config "C:\DevTestProjectWorkSpace\Unifi\Configs\project.config" -html "C:\DevTestProjectWorkSpace\Unifi\Reports.html"



  • 2.  Re: command line execution to run the scripts locally
    Best Answer

    Posted May 31, 2018 04:18 AM

    If I understand you questions property you wish to use TestRunner to run tests without staging them to the DevTest system proper - in much the same way as the "Stage a Quick Test" action in Workstation.

     

    If so, have you tried adding -cs local to your command line?



  • 3.  Re: command line execution to run the scripts locally

    Posted May 31, 2018 11:48 AM

    Thanks Dave, -cs local perfectly worked like run tests without staging. Appreciate your timely help



  • 4.  RE: Re: command line execution to run the scripts locally

    Posted Sep 25, 2019 08:42 AM
    Amazing....

    ./TestRunner -u username -p password -mar /Users/username/Documents/Softwares/DevTest10_3/Projects/WebserviceTest/Tests/WebserviceTest_DDFramework.mar -m tcp://IPAddress:2010/Registry -cs local

    This works fine.

    I was trying hard with many options... including -cs tcp://IPAddress:2011/Coordinator, -cs CoordinatorName, -cs Coordinator, -cs Coordinator@default...

    Thanks a lot.



  • 5.  RE: Re: command line execution to run the scripts locally

    Posted Sep 25, 2019 09:20 AM

    ​Hi Rohit,

    The problem could here is relative and absolute local file path.

    When you run your Test case through commandLine utility(testRunner), it creates a temp folder in lads which actually stores your txt or csv file.
    if your set your txt file path starts with {{LISA_RELATIVE_PROJ_ROOT}}, it won't understand this path, instead give hardcorded absolute file path where you want keep your file

    E>g: C:\Program Files\CASV\Projects\VirtualizationProject\Data

    Or you can parameterize this path in config and use across your test case.

    Hope this will work out.



    ------------------------------
    Thanks,
    Sabir
    ------------------------------



  • 6.  RE: Re: command line execution to run the scripts locally

    Posted Sep 25, 2019 11:02 AM

    Hi,

     

    I believe Sabir is on the right path but in this case we are not talking about a data file, we are talking about the subprocess file, that one needs to be inside the project that is created in the tmp lads directory, so that one does need to have a relative file path (beginning with {{LISA_RELATIVE_PROJ_ROOT}} ). I have seen cases where the workstation replaces this relative path with the hardcoded one which is the path where your workstation keeps the project on file.

     

    Against which coordinator are you running your testcase? The local one inside the workstation? (local) Or the coordinator of the platform (Coordinator@default)?

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 7.  RE: Re: command line execution to run the scripts locally

    Posted Sep 26, 2019 01:09 AM
    Hi Rohit,

    For executing the testcase remotely you have to use -m for reg and - cs for co-ordinator.

    In case of local co-ordinator, it should work without extra parameter if defined in associated Mar/Mari. If still not working, you can use "- cs local" for local execution.

    Thanks.



    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 8.  RE: Re: command line execution to run the scripts locally

    Posted Sep 26, 2019 02:59 AM
    ​My Bad, wrongly posted to this query

    Yes, adding coordinator name should resolve this.

    ------------------------------
    Thanks,
    Sabir
    ------------------------------



  • 9.  RE: Re: command line execution to run the scripts locally

    Posted Sep 26, 2019 03:05 AM
     Hi Sabir, The solution u gave was to my previous query -Thanks.

    Guys, 
    The below command (on local) works fine
    ./TestRunner -u username -p password -mar /Users/username/Documnts/Softwares/DevTest10_3/Projects/WebserviceTest/Tests/WebserviceTest_DDFramework.mar -m tcp://IPAddress:2010/Registry -cs local

    But when -cs local replaced with the (remote)coordinator gives exception.
    ./TestRunner -u username -p password -mar /Users/username/Documnts/Softwares/DevTest10_3/Projects/WebserviceTest/Tests/WebserviceTest_DDFramework.mar -m tcp://IPAddress:2010/Registry -cs Coordinator. 

     



  • 10.  RE: Re: command line execution to run the scripts locally

    Posted Sep 26, 2019 03:27 AM
    Could you print exception here.

    Make sure your -cs CoordinatorName: please verify your coordinator Name is correct & try adding staging doc in your command.

    Looking to exception we can confirm what could be the problem

    ------------------------------
    Thanks,
    Sabir
    ------------------------------



  • 11.  RE: Re: command line execution to run the scripts locally

    Posted Sep 26, 2019 03:38 AM
    The msg displayed on terminal
    bin username$ ./TestRunner -u username -p password -m tcp://IP:2010/Registry -mar /Users/username/Documents/Softwares/DevTest10_3/Projects/WebserviceTest/Tests/WebserviceTest_DDFramework.mar -cs Coordinator
    Locale: en_SG
    Setting System.out and System.err to: UTF-8
    LISA_HOME set to /Users/username/Documents/Softwares/DevTest10_3/
    DevTest temporary directory is /Users/username/lisatmp_10.3.0
    Configuring logging from '/Users/username/Documents/Softwares/DevTest10_3/logging.properties'
    DevTest Solutions, Copyright (c) 2002-2019 CA, All rights reserved.
    DevTest Test Runner - Stage and Execute Test Cases
    DevTest Solutions Version :: 10.3.0 (10.3.0.297)
    Installed patches:
    .... patch_DE417069_10.3.0_GA.jar: iteration 1 built for version 10.3.0 of DevTest
    .... DE417069: Unable to delete the xpath in the ignore node tab in the xml side to side comparison"
    There is no rules.properties and rules.xml file. No custom rules loaded.
    No custom rules loaded from /Users/username/Documents/Softwares/DevTest10_3/rules.xml
    [DevTest AGENT:C][WARN][12900][1][main][26 Sep, 2019 3:34:37 PM] Could not establish connection to Agent broker at tcp://localhost:2009?daemon=true
    [DevTest AGENT:C][WARN][12900][1][main][26 Sep, 2019 3:35:07 PM] Could not establish connection to Agent broker at tcp://IP:2009?daemon=true
    Security is enabled in DevTest
    User credentials are valid
    Failed to stage or start test/suite
    Failed to stage test!Failed to stage test!


    ============================================================================
    | Exception:
    ============================================================================
    | Message: Failed to stage test!
    ----------------------------------------------------------------------------
    | Trapped Exception: JMS Messaging problem with ServerRequestHandler for tcp://ip:2011/Coordinator Could not connect to broker URL: tcp://ip:2011?wireFormat.maxInactivityDuration=0. Reason: java.net.UnknownHostException: ip; nested exception is:
    com.itko.jms.JMSException: Could not connect to broker URL: tcp://ip:2011?wireFormat.maxInactivityDuration=0. Reason: java.net.UnknownHostException: ip
    | Trapped Message: java.rmi.RemoteException: JMS Messaging problem with ServerRequestH
    See logs for more.

    Exiting with exit code 254 (INTERNAL ERROR)


  • 12.  RE: Re: command line execution to run the scripts locally

    Posted Sep 26, 2019 03:41 AM

    Something wrong in your config file. Reason: java.net.UnknownHostException: ip

    The JMS Listen step tries to connect to host called: ip

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.