Api testing
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<boolProp name="TestPlan.functional_mode">false</boolProp>
|
||||
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
|
||||
</TestPlan>
|
||||
<hashTree>
|
||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="JWT Authentication" enabled="false">
|
||||
@@ -90,12 +88,12 @@
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="API Tests">
|
||||
<intProp name="ThreadGroup.num_threads">1</intProp>
|
||||
<intProp name="ThreadGroup.ramp_time">1</intProp>
|
||||
<intProp name="ThreadGroup.num_threads">5</intProp>
|
||||
<intProp name="ThreadGroup.ramp_time">20</intProp>
|
||||
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
||||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
|
||||
<stringProp name="LoopController.loops">2</stringProp>
|
||||
<stringProp name="LoopController.loops">20</stringProp>
|
||||
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||
</elementProp>
|
||||
</ThreadGroup>
|
||||
@@ -172,7 +170,7 @@
|
||||
</elementProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Transaction ID" enabled="true">
|
||||
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Transaction ID">
|
||||
<stringProp name="JSONPostProcessor.referenceNames">transactionId</stringProp>
|
||||
<stringProp name="JSONPostProcessor.jsonPathExprs">$.transactionId</stringProp>
|
||||
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
||||
@@ -200,7 +198,7 @@
|
||||
<stringProp name="JSONPostProcessor.defaultValues">8012345678</stringProp>
|
||||
</JSONPostProcessor>
|
||||
<hashTree/>
|
||||
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Country Code" enabled="true">
|
||||
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Extract Country Code">
|
||||
<stringProp name="JSONPostProcessor.referenceNames">countryCode</stringProp>
|
||||
<stringProp name="JSONPostProcessor.jsonPathExprs">$.countryCode</stringProp>
|
||||
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
||||
@@ -237,8 +235,12 @@
|
||||
<boolProp name="ISREGEX">true</boolProp>
|
||||
</JSONPathAssertion>
|
||||
<hashTree/>
|
||||
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
|
||||
<stringProp name="ConstantTimer.delay">1000</stringProp>
|
||||
</ConstantTimer>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SelectOffer" enabled="true">
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SelectOffer">
|
||||
<stringProp name="HTTPSampler.domain">${BASE_URL}</stringProp>
|
||||
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
||||
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
||||
@@ -293,8 +295,12 @@
|
||||
<intProp name="Assertion.test_type">8</intProp>
|
||||
</ResponseAssertion>
|
||||
<hashTree/>
|
||||
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
|
||||
<stringProp name="ConstantTimer.delay">1000</stringProp>
|
||||
</ConstantTimer>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="ProvideLoan" enabled="true">
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="ProvideLoan">
|
||||
<stringProp name="HTTPSampler.domain">${BASE_URL}</stringProp>
|
||||
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
||||
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
||||
@@ -343,6 +349,68 @@
|
||||
<intProp name="Assertion.test_type">8</intProp>
|
||||
</ResponseAssertion>
|
||||
<hashTree/>
|
||||
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
|
||||
<stringProp name="ConstantTimer.delay">1000</stringProp>
|
||||
</ConstantTimer>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="LoanStatus">
|
||||
<stringProp name="HTTPSampler.domain">${BASE_URL}</stringProp>
|
||||
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
||||
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
||||
<stringProp name="HTTPSampler.path">${API_PATH}/LoanStatus</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<stringProp name="HTTPSampler.method">POST</stringProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<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">
|
||||
{
|
||||
"customerId": "${customerId}",
|
||||
"accountId": "${AccountID}",
|
||||
"transactionId": "${transactionId}",
|
||||
"msisdn": "${msisdn}",
|
||||
"channel": "100"
|
||||
}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON Assertion - Result Code">
|
||||
<stringProp name="JSON_PATH">$.resultCode</stringProp>
|
||||
<stringProp name="EXPECTED_VALUE">00</stringProp>
|
||||
<boolProp name="JSONVALIDATION">true</boolProp>
|
||||
<boolProp name="EXPECT_NULL">false</boolProp>
|
||||
<boolProp name="INVERT">false</boolProp>
|
||||
<boolProp name="ISREGEX">true</boolProp>
|
||||
</JSONPathAssertion>
|
||||
<hashTree/>
|
||||
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion">
|
||||
<collectionProp name="Asserion.test_strings">
|
||||
<stringProp name="49586">200</stringProp>
|
||||
</collectionProp>
|
||||
<stringProp name="Assertion.custom_message"></stringProp>
|
||||
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
||||
<boolProp name="Assertion.assume_success">false</boolProp>
|
||||
<intProp name="Assertion.test_type">8</intProp>
|
||||
</ResponseAssertion>
|
||||
<hashTree/>
|
||||
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
|
||||
<stringProp name="ConstantTimer.delay">1000</stringProp>
|
||||
</ConstantTimer>
|
||||
<hashTree/>
|
||||
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor debtIdD">
|
||||
<stringProp name="JSONPostProcessor.referenceNames">debtId</stringProp>
|
||||
<stringProp name="JSONPostProcessor.jsonPathExprs">$.loans[0].debtId</stringProp>
|
||||
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
|
||||
<stringProp name="JSONPostProcessor.defaultValues">0</stringProp>
|
||||
</JSONPostProcessor>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Repayment">
|
||||
<stringProp name="HTTPSampler.domain">${BASE_URL}</stringProp>
|
||||
@@ -358,19 +426,13 @@
|
||||
<elementProp name="" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.value">{
|
||||
"requestId": "R${__time()}",
|
||||
"countryCode": "${countryCode}",
|
||||
"transactionId": "${transactionId}",
|
||||
"msisdn": "3451342",
|
||||
"debtId": "${debtId}",
|
||||
"countryCode": "NGR",
|
||||
"productId": "101",
|
||||
"transactionId": "TRX${__time()}${__Random(100,999)}",
|
||||
"customerId": "${CustomerId}",
|
||||
"accountId": "${AccountID}",
|
||||
"productId": "${productId}",
|
||||
"collectedAmount": "${currentLoanAmount}",
|
||||
"penalCharge": 0,
|
||||
"collectionMethod": 3,
|
||||
"lienAmount": "${currentLoanAmount}",
|
||||
"comment": "Repayment via JMeter test"
|
||||
"channel": "100"
|
||||
}</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
@@ -398,7 +460,7 @@
|
||||
</ResponseAssertion>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Sample Test Account CSV" enabled="true">
|
||||
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Sample Test Account CSV">
|
||||
<stringProp name="delimiter">,</stringProp>
|
||||
<stringProp name="fileEncoding"></stringProp>
|
||||
<stringProp name="filename">sample_account.csv</stringProp>
|
||||
@@ -448,7 +510,7 @@
|
||||
<stringProp name="filename"></stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
|
||||
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
|
||||
Reference in New Issue
Block a user