Service Virtualization

 View Only
Expand all | Collapse all

Command Line Execution of DevTest TestCases

  • 1.  Command Line Execution of DevTest TestCases

    Posted Aug 04, 2017 08:47 AM

    My DevTest test case has a filter( Save Property Value to a File) to write the request and response to a file. When this test case is executed via ITR, file is getting written. But when the test case is executed via command line file is not being written. Does command line does not support this? Or Do I need to follow any other procedure? Please clarify.



  • 2.  Re: Command Line Execution of DevTest TestCases

    Broadcom Employee
    Posted Aug 04, 2017 09:14 AM

    What is the location of the file being written to using ITR?

    Please provide the command line syntax used for executing the test case



  • 3.  Re: Command Line Execution of DevTest TestCases

    Posted Aug 07, 2017 01:48 AM

    Prem,

    Below is the command used


    TestRunner -a -u svpower -p svpower -m tcp://XXXX:port/Registry -t "C:\TestCases\Interface Connectivity Scripts\AddressView.tst"


    Location used :{{path}}\AddressView-req.xml


    project.config :

    path = C:\Result\Request

     

    Even tried by directly providing the path instead of parameterizing.

     

     

     



  • 4.  Re: Command Line Execution of DevTest TestCases

    Broadcom Employee
    Posted Aug 07, 2017 09:48 AM

    Please check the following links

     

    https://docops.ca.com/devtest-solutions/9-5/en/using/using-ca-application-test/using-devtest-workstation-with-ca-application-test/running-test-cases-and-suites/test-runner/run-a-test-case-with-test-runner/

     

    https://docops.ca.com/devtest-solutions/9-5/en/using/using-ca-application-test/using-devtest-workstation-with-ca-application-test/running-test-cases-and-suites/test-runner

     

    I see you are missing [-r StagingDocument] in your command. There are other options mentioned in the links above which may be required in your case (depends on your testcase design & dependencies)

     

    Once you have corrected the above - please check the runner.log file to see if there are any errors reported.



  • 5.  Re: Command Line Execution of DevTest TestCases

    Posted Aug 08, 2017 02:51 AM

    I tried with -r staging doc and -html to generate the html report. The html report is getting saved in the path provided. but still file is not getting written which has same path as html report.

     

    Am I missing some thing or writing file through filter is not supported via command line?



  • 6.  Re: Command Line Execution of DevTest TestCases

    Posted Sep 07, 2017 09:19 AM

    Prem,

    Can you respond to Kavitha's last reply?



  • 7.  Re: Command Line Execution of DevTest TestCases

    Posted Sep 07, 2017 10:19 AM

    Hi,

         Did you try setting the path to be within folder of DevTest?

                                Thanks,

    Regards,

    Vish



  • 8.  Re: Command Line Execution of DevTest TestCases

    Posted Aug 20, 2018 09:49 AM

    Hi, 

    I have the same situation to execute the test case from command prompt. I am able to execute if it is a simple test case. But I have a test case with another test case as "sub-process", when I try to run the main test cases, process is stopped after the statement "User credentials are valid". 

     

    How to run the test cases with sub-process in command prompt?



  • 9.  RE: Re: Command Line Execution of DevTest TestCases

    Posted Sep 25, 2019 08:42 AM
    Hi Team, I am facing the same issue... any solutions for test execution through command line using Testrunner and writing the req-rsp logs to a txt file?


  • 10.  RE: Re: Command Line Execution of DevTest TestCases

    Posted Sep 26, 2019 01:19 AM
    Edited by Vaibhav Jain Sep 26, 2019 01:30 AM
    Hi Senthilnathan,

    I don't think we need any special parameter to execute test cases with sub-process (when compared with test case execution for non-subprocess ones).
    For credential issue, you can try providing -u and -p as user name and password.

    If you get a message user credentials are valid it expects you to press enter to start execution, to avoid it you can use -a paramater.

    Thanks.

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



  • 11.  RE: Command Line Execution of DevTest TestCases

    Posted Sep 25, 2019 08:42 AM
    Hi Kavitha wr u able to resolve this item?

    -Thanks


  • 12.  RE: Command Line Execution of DevTest TestCases

    Posted Sep 26, 2019 01:38 AM
    Hi Rohit & Kavitha,

    I am able to create and save files when executing a test case. Usually, the path selected is defaulted to "LISA_RELATIVE_PROJ_ROOT" , try using a full path like 
    "D:\CA\DevTest10_5\Projects\Trainning_Day1\test.xml" in the filter and if you have privileges to write to that location, it will work.

    Thanks.

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



  • 13.  RE: Command Line Execution of DevTest TestCases

    Posted Sep 26, 2019 02:36 AM
    Hi Vaibhav, Thanks a lot.

    Replacing "{{LISA_RELATIVE_PROJ_ROOT}}" the DevTest/ LISA property with a absolute path works fine.

    Not working: {{LISA_RELATIVE_PROJ_ROOT}}/Data/{{result}}/ResultLog.csv
    Working: {{ProjLogs}}/{{result}}/ResultLog.csv
    In Project.config >> ProjLogs = /Users/rohit_sawant/Documents/Softwares/DevTest10_3/Projects/WebserviceTest/Data

    Thanks & Best Regards,
    Rohit Sawant


  • 14.  RE: Command Line Execution of DevTest TestCases
    Best Answer

    Broadcom Employee
    Posted Sep 26, 2019 07:15 AM
    Test works in ITR because it is running locally and have access to the project root or the path where file is createdbut when you stage it the test is going to create MAR file in lisatmp_10.xx/lads folder where it can't create the file due to permissions. 

    Support recommend to use the path outside the Project root and make sure the path you specified has full permissions.