Service Virtualization

  • 1.  Error using ANT to run DevTest

    Posted Jan 17, 2018 12:42 AM

    I'm trying to run a CA test using ANT (for continuous testing) and am getting the error "Could not set up suite of tests" shown in the output below. I'm running DevTest server and ANT in a windows environment and have attached the build.xml and build.properties files. 

    Any ideas on how to triage this issue? If I bypass ANT and use  testrunner  the test runs fine from the command line.

    ie TestRunner -u admin -p admin -r "D:\Program Files\ca\devtest\examples\StagingDocs\Splunk_Staging_Doc.stg" -t "D:\Program Files\ca\devtest\examples\Tests\splunk_dashboard.tst" -a 

     

    lisaTests:
    [delete] Deleting directory D:\Program Files\CA\DevTest\reports\junit
    [mkdir] Created dir: D:\Program Files\CA\DevTest\reports\junit
    [junitlisa] value = true
    [junitlisa] log4j:WARN No appenders could be found for logger (com.itko.lisa.util.os.OSUtils).
    [junitlisa] log4j:WARN Please initialize the log4j system properly.
    [junitlisa] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    [junitlisa] Locale: en_AU
    [junitlisa] Setting System.out and System.err to: Cp1252
    [junitlisa] LISA_HOME set to D:\Program Files\CA\DevTest\
    [junitlisa] DevTest temporary directory is C:\Users\perrinj2admin\lisatmp_9.5.0
    [junitlisa] Configuring logging from 'D:\Program Files\CA\DevTest\logging.properties'
    [junitlisa] log4j:WARN No appenders could be found for logger (com.itko.lisa.test.TestExecHelper).
    [junitlisa] log4j:WARN Please initialize the log4j system properly.
    [junitlisa] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    [junitlisa] DevTest Solutions, Copyright (c) 2002-2018 CA, All rights reserved.
    [junitlisa] DevTest Regression Runner - Stage and Execute Tests with Auditing
    [junitlisa] Generated rules from D:\Program Files\CA\DevTest\rules.xml
    [junitlisa] [DevTest AGENT:C][WARN][386132][1][main][17/01/2018 4:12:30 PM] Could not establish connection to Agent broker at tcp://localhost:2009?daemon=true
    [junitlisa] [DevTest AGENT:C][WARN][386132][1][main][17/01/2018 4:12:31 PM] Could not establish connection to Agent broker at tcp://APPAU401MEL5058:2009?daemon=true
    [junitlisa] Security is enabled
    [junitlisa] User information is valid
    [junitlisa] Usage: java -classpath [classpath] [-m TestRegistry] [-spec (spec below)]
    [junitlisa] [-mar marLocation] [-s suiteLocation] [-config config.file] [-preview]
    [junitlisa]
    [junitlisa] Use -m to specify the DevTest Registry, or omit to execute the suite locally.
    [junitlisa] Use -spec to specify a CoordinatorServer and Staging Document to execute.
    [junitlisa] you can specify multiple entries by using the -1 many times in the form:
    [junitlisa] cs=csName&run=stagingFile&testCase=testCaseDoc&config=configFile&audit=auditDoc
    [junitlisa] (some command line shells will require a backslash (\) before those & characters!)
    [junitlisa] -mar to provide the suite document contained in a model archive
    [junitlisa] -s to provide the suite document
    [junitlisa] -config to provide an alternate configuration document for use by this suite
    [junitlisa] -preview to list the test cases that would be executed without executing them
    [junitlisa] -u for user id and -p for password if ACL is enabled
    [junitlisa] Running com.itko.lisa.testing.JUnitRunLISA
    [junitlisa] Could not set up suite of tests: -1 D:\Program Files\ca\DevTest\examples\Tests\splunk_dashboard.tst&run=D:\Program Files\ca\DevTest\examples\StagingDocs\Splunk_Staging_Doc.stg -s D:\Program Files\CA\DevTest\examples\Suites\AllTestsSuite.ste -u admin -p admin
    [junitlisa] java.lang.Exception: Could not set up suite of tests: -1 D:\Program Files\ca\DevTest\examples\Tests\splunk_dashboard.tst&run=D:\Program Files\ca\DevTest\examples\StagingDocs\Splunk_Staging_Doc.stg -s D:\Program Files\CA\DevTest\examples\Suites\AllTestsSuite.ste -u admin -p admin
    [junitlisa] at com.itko.lisa.testing.JUnitRunLISA.suite(JUnitRunLISA.java:120)
    [junitlisa] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junitlisa] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [junitlisa] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junitlisa] at java.lang.reflect.Method.invoke(Method.java:498)
    [junitlisa] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:405)
    [junitlisa] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1182)
    [junitlisa] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1033)
    [junitlisa]
    [junitlisa] java.lang.Exception: Could not set up suite of tests: -1 D:\Program Files\ca\DevTest\examples\Tests\splunk_dashboard.tst&run=D:\Program Files\ca\DevTest\examples\StagingDocs\Splunk_Staging_Doc.stg -s D:\Program Files\CA\DevTest\examples\Suites\AllTestsSuite.ste -u admin -p admin
    [junitlisa] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec
    [junitlisareport] Creating default fileset
    [junitlisareport] Creating default report
    [junitlisareport] Processing D:\Program Files\CA\DevTest\reports\junit\TESTS-TestSuites.xml to C:\Users\PERRIN~1\AppData\Local\Temp\7\null363220707
    [junitlisareport] Loading stylesheet jar:file:/D:/Program%20Files/apache-ant-1.10.1/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
    [junitlisareport] Transform time: 1588ms
    [junitlisareport] Deleting: C:\Users\PERRIN~1\AppData\Local\Temp\7\null363220707
    [echo] The JUnit report is available at D:\Program Files\CA\DevTest\reports\junit/index.html

    BUILD SUCCESSFUL
    Total time: 30 seconds

    Attachment(s)

    zip
    build.xml.zip   2 KB 1 version
    zip
    build.properties.zip   407 B 1 version


  • 2.  Re: Error using ANT to run DevTest
    Best Answer

    Broadcom Employee
    Posted Jan 18, 2018 11:33 AM

    Hello John,

     

                If you want to run both the test as well as suite, specify as given below in the build.xml. (seperate lisatest sections for the test and suite)

     

    <junitlisa toDir="${testReportDir}"
    user="admin"
    password="admin">
    <lisatest suite="D:\Program Files\CA\DevTest\examples\Suites\AllTestsSuite.ste" stagingDoc="D:\Program Files\ca\DevTest\examples\StagingDocs\Splunk_Staging_Doc.stg"/>
    <lisatest test="D:\Program Files\ca\DevTest\examples\Tests\splunk_dashboard.tst" stagingDoc="D:\Program Files\ca\DevTest\examples\StagingDocs\Splunk_Staging_Doc.stg"/>
    </junitlisa>

     

    Please let us know if this works. 



  • 3.  Re: Error using ANT to run DevTest

    Posted Jan 21, 2018 05:40 PM

    Hi Sursu06,

    Thanks. Your answer helped resolve my issue. I also had some path problems which needed to be sorted out. All working now

    Regards,

    John



  • 4.  Re: Error using ANT to run DevTest

    Posted Jun 27, 2018 05:56 AM

    Hi john.perrin  --

     

    I am also facing same issue , can you please share details on what all changes you did?

     

    Regards,

    Akshay M.