How to Pass JVM Parameters into DevTest

book

Article ID: 15271

calendar_today

Updated On:

Products

CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder)

Issue/Introduction

 

I am using ant build and build.xml to trigger tests from Jenkins, I need to pass the Jenkins variables to DevTest test as properties so that I can use it during run time. How do we do that? 

jvmarg value="-DmyProperty=MyProperty

 

This document shows you how to pass JVM properties to DevTest

Cause

 

N/A

Environment

 

All supported releases and platforms of DevTest.

Resolution

 

To pass a JVM variable to DevTest as a  property , follow the below approach :

Use "jvmarg" tags inside junitlisa tag. so that, value assigned to jvmarg will be considered as a jvm property and you can directly use it as DevTest property.

 

Ex: in the build.xml file 

 

<junitlisa toDir="${testReportDir}" 

outputtoformatters="false" 

test="Tests/DevTest_config_info.tst" 

stagingDoc="StagingDocs/1User0Think_RunContinuously.stg" 

user="admin" 

password="admin"> 

<jvmarg value="-DmyProperty=MyProperty"/> 

<jvmarg value="-Dlisa.tmpdir=${lisa.test.project.temp.dir}"/> 

<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/> 

<jvmarg value="-XX:HeapDumpPath=/app/lisa/tmp"/> 

 

</junitlisa> 

 

Additional Information

Note: This property will work when you run test locally. To run the test locally, modify staging doc with simulator name as local (instead of auto). 

If you want to use the property from build.xml file to test suite, make sure you give coordinator and simulator name are local while running the suite.