blue
blue

Reputation: 217

How to keep quotes in ant property ("")?

I was debugging jenkins + ant + jmeter framework in the process of finding jenkins pass with double quotation marks ("xxx") to jmeter when double quotes ("") can not be displayed, become xxx, i see build.xml and debug Found that there may be ant to jmeter process there is a problem? See below

Here parameters are quotation marks ("MallID") enter image description here

enter image description hereenter image description here

<target name="run" depends="clean, show-test-properties">
		
		<!-- create dir -->
		<mkdir  dir="${test.result.path}"/>
		<mkdir  dir="${test.log.path}"/>
		
		<jmeter
			jmeterhome="${jmeter.home}"
		    testplan ="${test.plan.path}"
		    resultlog="${test.result.path}/result.jtl"
			jmeterlogfile="${test.log.path}/jmeter.log"
			>
			<jvmarg value="${jvm.arg}"/> <!-- modify as you wish -->
			
			<!-- Force suitable defaults -->
			<!-- values for UDV -->
			<property name="api.url" value="${api.url}"/>
			<property name="api.fieldparam" value="${api.fieldparam}"/>
			<property name="api.bodyparam" value="${api.bodyparam}"/>

		</jmeter>
	</target>

enter image description here

Here all the quotation marks("") marks are canceled (MallID) why? enter image description here

Upvotes: 1

Views: 1665

Answers (1)

calvin.lau
calvin.lau

Reputation: 76

When setting anything in Ant, it requires you to use double quotations (i.e. "") in order to specify the value. If you wish to keep the quotations in the value, may I suggest trying the following:

<property name="api.url" value="&quot;${api.url}&quot;"/>
<property name="api.fieldparam" value="&quot;${api.fieldparam}&quot;"/>
<property name="api.bodyparam" value="&quot;${api.bodyparam}&quot;"/>

Upvotes: 1

Related Questions