|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4"> |
|
|
|
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3"> |
|
|
|
<hashTree> |
|
|
|
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> |
|
|
|
<stringProp name="TestPlan.comments"></stringProp> |
|
|
|
@ -26,15 +26,54 @@ |
|
|
|
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> |
|
|
|
</ThreadGroup> |
|
|
|
<hashTree> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Books" enabled="true"> |
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create a book" enabled="true"> |
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
|
|
|
<collectionProp name="Arguments.arguments"> |
|
|
|
<elementProp name="" elementType="HTTPArgument"> |
|
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp> |
|
|
|
<stringProp name="Argument.value">{
 |
|
|
|
"name": "${__RandomString(5, abcdefghijklmnopqrstuvwxyz)}",
 |
|
|
|
"price": ${__Random(1,999)},
 |
|
|
|
"isAvailable": true
 |
|
|
|
}
 |
|
|
|
</stringProp> |
|
|
|
<stringProp name="Argument.metadata">=</stringProp> |
|
|
|
</elementProp> |
|
|
|
</collectionProp> |
|
|
|
</elementProp> |
|
|
|
<stringProp name="HTTPSampler.domain">localhost</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5000</stringProp> |
|
|
|
<stringProp name="HTTPSampler.protocol">https</stringProp> |
|
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">/api/books/</stringProp> |
|
|
|
<stringProp name="HTTPSampler.method">POST</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> |
|
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp> |
|
|
|
</HTTPSamplerProxy> |
|
|
|
<hashTree> |
|
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Get book id" enabled="true"> |
|
|
|
<stringProp name="JSONPostProcessor.referenceNames">BookId</stringProp> |
|
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$</stringProp> |
|
|
|
<stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
|
|
|
<stringProp name="Scope.variable"></stringProp> |
|
|
|
</JSONPostProcessor> |
|
|
|
<hashTree/> |
|
|
|
</hashTree> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get book by id" enabled="true"> |
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> |
|
|
|
<collectionProp name="Arguments.arguments"/> |
|
|
|
</elementProp> |
|
|
|
<stringProp name="HTTPSampler.domain">localhost</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5001</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5000</stringProp> |
|
|
|
<stringProp name="HTTPSampler.protocol">https</stringProp> |
|
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">/api/books</stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">api/books/${BookId}</stringProp> |
|
|
|
<stringProp name="HTTPSampler.method">GET</stringProp> |
|
|
|
<boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
|
|
|
<boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
|
|
|
@ -45,16 +84,16 @@ |
|
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp> |
|
|
|
</HTTPSamplerProxy> |
|
|
|
<hashTree/> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Book" enabled="true"> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Update a book" enabled="true"> |
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
|
|
|
<collectionProp name="Arguments.arguments"> |
|
|
|
<elementProp name="" elementType="HTTPArgument"> |
|
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp> |
|
|
|
<stringProp name="Argument.value">{
 |
|
|
|
"name": "My book",
 |
|
|
|
"price": "33",
 |
|
|
|
"isAvailable": "true"
 |
|
|
|
"name": "${__RandomString(5, abcdefghijklmnopqrstuvwxyz)}",
 |
|
|
|
"price": ${__Random(1,999)},
 |
|
|
|
"isAvailable": true
 |
|
|
|
}
 |
|
|
|
</stringProp> |
|
|
|
<stringProp name="Argument.metadata">=</stringProp> |
|
|
|
@ -62,11 +101,30 @@ |
|
|
|
</collectionProp> |
|
|
|
</elementProp> |
|
|
|
<stringProp name="HTTPSampler.domain">localhost</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5001</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5000</stringProp> |
|
|
|
<stringProp name="HTTPSampler.protocol">https</stringProp> |
|
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">/api/books/</stringProp> |
|
|
|
<stringProp name="HTTPSampler.method">POST</stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">/api/books/${BookId}</stringProp> |
|
|
|
<stringProp name="HTTPSampler.method">PUT</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> |
|
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp> |
|
|
|
</HTTPSamplerProxy> |
|
|
|
<hashTree/> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get books" enabled="true"> |
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> |
|
|
|
<collectionProp name="Arguments.arguments"/> |
|
|
|
</elementProp> |
|
|
|
<stringProp name="HTTPSampler.domain">localhost</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5000</stringProp> |
|
|
|
<stringProp name="HTTPSampler.protocol">https</stringProp> |
|
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">/api/books</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> |
|
|
|
@ -76,44 +134,63 @@ |
|
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp> |
|
|
|
</HTTPSamplerProxy> |
|
|
|
<hashTree/> |
|
|
|
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true"> |
|
|
|
<boolProp name="ResultCollector.error_logging">false</boolProp> |
|
|
|
<objProp> |
|
|
|
<name>saveConfig</name> |
|
|
|
<value class="SampleSaveConfiguration"> |
|
|
|
<time>true</time> |
|
|
|
<latency>true</latency> |
|
|
|
<timestamp>true</timestamp> |
|
|
|
<success>true</success> |
|
|
|
<label>true</label> |
|
|
|
<code>true</code> |
|
|
|
<message>true</message> |
|
|
|
<threadName>true</threadName> |
|
|
|
<dataType>true</dataType> |
|
|
|
<encoding>false</encoding> |
|
|
|
<assertions>true</assertions> |
|
|
|
<subresults>true</subresults> |
|
|
|
<responseData>false</responseData> |
|
|
|
<samplerData>false</samplerData> |
|
|
|
<xml>false</xml> |
|
|
|
<fieldNames>true</fieldNames> |
|
|
|
<responseHeaders>false</responseHeaders> |
|
|
|
<requestHeaders>false</requestHeaders> |
|
|
|
<responseDataOnError>false</responseDataOnError> |
|
|
|
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
|
|
|
<assertionsResultsToSave>0</assertionsResultsToSave> |
|
|
|
<bytes>true</bytes> |
|
|
|
<sentBytes>true</sentBytes> |
|
|
|
<url>true</url> |
|
|
|
<threadCounts>true</threadCounts> |
|
|
|
<idleTime>true</idleTime> |
|
|
|
<connectTime>true</connectTime> |
|
|
|
</value> |
|
|
|
</objProp> |
|
|
|
<stringProp name="filename"></stringProp> |
|
|
|
</ResultCollector> |
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete a book" enabled="true"> |
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> |
|
|
|
<collectionProp name="Arguments.arguments"/> |
|
|
|
</elementProp> |
|
|
|
<stringProp name="HTTPSampler.domain">localhost</stringProp> |
|
|
|
<stringProp name="HTTPSampler.port">5000</stringProp> |
|
|
|
<stringProp name="HTTPSampler.protocol">https</stringProp> |
|
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.path">/api/books/${BookId}</stringProp> |
|
|
|
<stringProp name="HTTPSampler.method">DELETE</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> |
|
|
|
<stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.connect_timeout"></stringProp> |
|
|
|
<stringProp name="HTTPSampler.response_timeout"></stringProp> |
|
|
|
</HTTPSamplerProxy> |
|
|
|
<hashTree/> |
|
|
|
</hashTree> |
|
|
|
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true"> |
|
|
|
<boolProp name="ResultCollector.error_logging">false</boolProp> |
|
|
|
<objProp> |
|
|
|
<name>saveConfig</name> |
|
|
|
<value class="SampleSaveConfiguration"> |
|
|
|
<time>true</time> |
|
|
|
<latency>true</latency> |
|
|
|
<timestamp>true</timestamp> |
|
|
|
<success>true</success> |
|
|
|
<label>true</label> |
|
|
|
<code>true</code> |
|
|
|
<message>true</message> |
|
|
|
<threadName>true</threadName> |
|
|
|
<dataType>true</dataType> |
|
|
|
<encoding>false</encoding> |
|
|
|
<assertions>true</assertions> |
|
|
|
<subresults>true</subresults> |
|
|
|
<responseData>false</responseData> |
|
|
|
<samplerData>false</samplerData> |
|
|
|
<xml>false</xml> |
|
|
|
<fieldNames>true</fieldNames> |
|
|
|
<responseHeaders>false</responseHeaders> |
|
|
|
<requestHeaders>false</requestHeaders> |
|
|
|
<responseDataOnError>false</responseDataOnError> |
|
|
|
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
|
|
|
<assertionsResultsToSave>0</assertionsResultsToSave> |
|
|
|
<bytes>true</bytes> |
|
|
|
<sentBytes>true</sentBytes> |
|
|
|
<url>true</url> |
|
|
|
<threadCounts>true</threadCounts> |
|
|
|
<idleTime>true</idleTime> |
|
|
|
<connectTime>true</connectTime> |
|
|
|
</value> |
|
|
|
</objProp> |
|
|
|
<stringProp name="filename"></stringProp> |
|
|
|
</ResultCollector> |
|
|
|
<hashTree/> |
|
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
|
|
|
<collectionProp name="HeaderManager.headers"> |
|
|
|
<elementProp name="" elementType="Header"> |
|
|
|
|