Service Virtualization

Expand all | Collapse all

How to include custom jar file during Command line execution of a test case?

  • 1.  How to include custom jar file during Command line execution of a test case?

    Posted 03-12-2019 10:13 AM

    Hi,

    My test case has "Execute Script (Groovy)" step which is using a custom jar file with my own classes. 

    I am trying to execute the test through command line argument by using the below command;

     

    TestRunner -a -u <<Username>> -p <<Password>> -m tcp://<<hostname>>:2010/Registry -t "projectfolderpath\Tests\Test.tst" -html "projectfolderpath\Data\SampleResults.html"

     

    But those classes are not identified by TestRunner during the command line execution.

    How can i include those custom jar files for the same?

     

    If I execute through CA DevTest workstation, its working without any issues. 

     

    Kindly help me solving this problem. 

     

    Thanks

    Senthilnathan. S



  • 2.  Re: How to include custom jar file during Command line execution of a test case?

    Broadcom Employee
    Posted 03-14-2019 09:38 AM

    Where is the custom jar? in DevTest-Home/HotDeploy folder? 



  • 3.  Re: How to include custom jar file during Command line execution of a test case?

    Posted 03-14-2019 09:43 AM

    Yes I have them placed in my HotDeploy folder (not in server)

     

    Update:

    I am able to trigger a simple test cases through command line after including "-cs local " in the argument.

    However the test cases which has more steps are having the below error during the execution;

     

    TestRunner -a -u ******** -p ******** -m tcp://
    ******:2010/Registry -t ".../Tests/.Main.tst" -html "..../Data/Execution Results/.Main.html" -cs local
    Reading user properties from C:\Program Files\CA\DevTest\bin\/../\lisa.user.prop
    erties
    Locale: en_US
    Setting System.out and System.err to: Cp1252
    LISA_HOME set to C:\PROGRA~1\CA\DevTest\
    DevTest temporary directory is C:\Users\sxs1382\lisatmp_10.2.4
    Configuring logging from 'C:\PROGRA~1\CA\DevTest\logging.properties'
    DevTest Solutions, Copyright (c) 2002-2019 CA, All rights reserved.
    DevTest Test Runner - Stage and Execute Test Cases
    DevTest Solutions Version :: 10.2.4 (10.2.4.153)
    Installed patches: none
    Generated rules from C:\PROGRA~1\CA\DevTest\rules.xml
    [DevTest AGENT:C][WARN][17356][1][main][Mar 14, 2019 7:21:34 PM] Could not estab
    lish connection to Agent broker at tcp://localhost:2009?daemon=true
    Security is enabled in DevTest
    User credentials are valid
    java.lang.OutOfMemoryError: Java heap space
    Dumping heap to C:\Program Files\CA\DevTest\bin\/../tmp\java_pid17356.hprof ...
    Heap dump file created [303464765 bytes in 2.046 secs]
    java.lang.NullPointerException
    at com.itko.lisa.coordinator.TestRunner.main(TestRunner.java:494)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.exe4j.runtime.WinLauncher.main(Unknown Source)
    at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)

     

    Any idea on this?



  • 4.  Re: How to include custom jar file during Command line execution of a test case?

    Broadcom Employee
    Posted 03-14-2019 05:42 PM

    Looks like you are running into  OOM errors.  

    Please open a ticket with Support.  We can trouble shoot this on a Webex

     

    Thanks

     

    Shiney