NIHVIVO-1129 Add a test for Info Resource pages.

This commit is contained in:
jeb228 2011-01-06 20:47:01 +00:00
parent 89fef9ab6c
commit 1e27c494eb
4 changed files with 79 additions and 14 deletions

View file

@ -74,9 +74,12 @@ report - Just summarize output from previously run tests.
<fail unless="webapp.name"
message="${properties.file} must contain a value for webapp.name" />
<fail unless="file.uri.list"
message="${properties.file} must contain a value for file.uri.list" />
<fail unless="data.dir"
message="${properties.file} must contain a value for data.dir" />
<!-- If no value was provided, run everything 10 times -->
<property name="iterations" value="10" />
<property name="webapp.url" value="http://${webapp.host}:${webapp.port}/${webapp.name}" />
<path id="xslt.classpath">
@ -105,8 +108,23 @@ report - Just summarize output from previously run tests.
</condition>
<fail unless="webapp.is.available" message="Webapp is not available at ${webapp.url}" />
<!-- Need to convert abstract paths to system-specific paths, or JMeter will call them relative paths -->
<property name="file.uri.list.location" location="${file.uri.list}" />
<property name="file.person.uris" location="${data.dir}/personUris.csv" />
<fail message="File &quot;${file.person.uris}&quot; does not exist.">
<condition>
<not>
<available file="${file.person.uris}" />
</not>
</condition>
</fail>
<property name="file.infoResource.uris" location="${data.dir}/infoResourceUris.csv" />
<fail message="File &quot;${file.infoResource.uris}&quot; does not exist.">
<condition>
<not>
<available file="${file.infoResource.uris}" />
</not>
</condition>
</fail>
<jmeter jmeterhome="${jmeter.home.dir}"
testplan="${tests.dir}/${test.name}.jmx"
@ -115,7 +133,9 @@ report - Just summarize output from previously run tests.
<property name="webapp.host" value="${webapp.host}" />
<property name="webapp.port" value="${webapp.port}" />
<property name="webapp.name" value="${webapp.name}" />
<property name="file.uri.list" value="${file.uri.list.location}" />
<property name="iterations" value="${iterations}" />
<property name="file.person.uris" value="${file.person.uris}" />
<property name="file.infoResource.uris" value="${file.infoResource.uris}" />
<!-- Set parameters for the output -->
<property name="jmeter.save.saveservice.output_format" value="xml" />

View file

@ -22,9 +22,19 @@
<stringProp name="Argument.value">${__property(webapp.name, vivo)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="FILE_URI_LIST" elementType="Argument">
<stringProp name="Argument.name">FILE_URI_LIST</stringProp>
<stringProp name="Argument.value">${__property(file.uri.list, individualUris.csv)}</stringProp>
<elementProp name="PERSON_URI_FILE" elementType="Argument">
<stringProp name="Argument.name">PERSON_URI_FILE</stringProp>
<stringProp name="Argument.value">${__property(file.person.uris, PersonUris.csv)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="INFO_RESOURCE_URI_FILE" elementType="Argument">
<stringProp name="Argument.name">INFO_RESOURCE_URI_FILE</stringProp>
<stringProp name="Argument.value">${__property(file.infoResource.uris, InfoResourceUris.csv)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="ITERATIONS" elementType="Argument">
<stringProp name="Argument.name">ITERATIONS</stringProp>
<stringProp name="Argument.value">${__property(iterations, 10)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
@ -36,7 +46,7 @@
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">50</stringProp>
<stringProp name="LoopController.loops">${ITERATIONS}</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
@ -107,7 +117,7 @@
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSampler>
<hashTree/>
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Profile page" enabled="true">
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Person Profile page" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@ -117,7 +127,7 @@
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">${WEBAPP_NAME}/display/${INDIVIDUAL_URI}</stringProp>
<stringProp name="HTTPSampler.path">${WEBAPP_NAME}/display/${PERSON_URI}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -127,15 +137,47 @@
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSampler>
<hashTree>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Individual URIs from CSV" enabled="true">
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Person URIs from CSV" enabled="true">
<stringProp name="delimiter">,</stringProp>
<stringProp name="fileEncoding">utf8</stringProp>
<stringProp name="filename">${FILE_URI_LIST}</stringProp>
<stringProp name="filename">${PERSON_URI_FILE}</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<stringProp name="shareMode">Current thread group</stringProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="variableNames">INDIVIDUAL_URI</stringProp>
<stringProp name="variableNames">PERSON_URI</stringProp>
</CSVDataSet>
<hashTree/>
</hashTree>
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="InfoResource Profile Page" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">${WEBAPP_NAME}/display/${INFO_RESOURCE_URI}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSampler>
<hashTree>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
<stringProp name="filename">${INFO_RESOURCE_URI_FILE}</stringProp>
<stringProp name="fileEncoding">utf8</stringProp>
<stringProp name="variableNames">INFO_RESOURCE_URI</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">All threads</stringProp>
</CSVDataSet>
<hashTree/>
</hashTree>

View file

@ -0,0 +1,3 @@
n432
n4585
n7159
1 n432
2 n4585
3 n7159