Api testing
This commit is contained in:
@@ -27,8 +27,6 @@
|
|||||||
</elementProp>
|
</elementProp>
|
||||||
</collectionProp>
|
</collectionProp>
|
||||||
</elementProp>
|
</elementProp>
|
||||||
<boolProp name="TestPlan.functional_mode">false</boolProp>
|
|
||||||
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
|
|
||||||
</TestPlan>
|
</TestPlan>
|
||||||
<hashTree>
|
<hashTree>
|
||||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="JWT Authentication" enabled="false">
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="JWT Authentication" enabled="false">
|
||||||
@@ -90,12 +88,12 @@
|
|||||||
<hashTree/>
|
<hashTree/>
|
||||||
</hashTree>
|
</hashTree>
|
||||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="API Tests">
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="API Tests">
|
||||||
<intProp name="ThreadGroup.num_threads">1</intProp>
|
<intProp name="ThreadGroup.num_threads">5</intProp>
|
||||||
<intProp name="ThreadGroup.ramp_time">1</intProp>
|
<intProp name="ThreadGroup.ramp_time">20</intProp>
|
||||||
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
||||||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
||||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
|
<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>
|
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||||
</elementProp>
|
</elementProp>
|
||||||
</ThreadGroup>
|
</ThreadGroup>
|
||||||
@@ -172,7 +170,7 @@
|
|||||||
</elementProp>
|
</elementProp>
|
||||||
</HTTPSamplerProxy>
|
</HTTPSamplerProxy>
|
||||||
<hashTree>
|
<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.referenceNames">transactionId</stringProp>
|
||||||
<stringProp name="JSONPostProcessor.jsonPathExprs">$.transactionId</stringProp>
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.transactionId</stringProp>
|
||||||
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
||||||
@@ -200,7 +198,7 @@
|
|||||||
<stringProp name="JSONPostProcessor.defaultValues">8012345678</stringProp>
|
<stringProp name="JSONPostProcessor.defaultValues">8012345678</stringProp>
|
||||||
</JSONPostProcessor>
|
</JSONPostProcessor>
|
||||||
<hashTree/>
|
<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.referenceNames">countryCode</stringProp>
|
||||||
<stringProp name="JSONPostProcessor.jsonPathExprs">$.countryCode</stringProp>
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.countryCode</stringProp>
|
||||||
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
||||||
@@ -237,8 +235,12 @@
|
|||||||
<boolProp name="ISREGEX">true</boolProp>
|
<boolProp name="ISREGEX">true</boolProp>
|
||||||
</JSONPathAssertion>
|
</JSONPathAssertion>
|
||||||
<hashTree/>
|
<hashTree/>
|
||||||
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
|
||||||
|
<stringProp name="ConstantTimer.delay">1000</stringProp>
|
||||||
|
</ConstantTimer>
|
||||||
|
<hashTree/>
|
||||||
</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.domain">${BASE_URL}</stringProp>
|
||||||
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
||||||
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
||||||
@@ -293,8 +295,12 @@
|
|||||||
<intProp name="Assertion.test_type">8</intProp>
|
<intProp name="Assertion.test_type">8</intProp>
|
||||||
</ResponseAssertion>
|
</ResponseAssertion>
|
||||||
<hashTree/>
|
<hashTree/>
|
||||||
|
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
|
||||||
|
<stringProp name="ConstantTimer.delay">1000</stringProp>
|
||||||
|
</ConstantTimer>
|
||||||
|
<hashTree/>
|
||||||
</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.domain">${BASE_URL}</stringProp>
|
||||||
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
|
||||||
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
<stringProp name="HTTPSampler.protocol">${PROTO}</stringProp>
|
||||||
@@ -343,6 +349,68 @@
|
|||||||
<intProp name="Assertion.test_type">8</intProp>
|
<intProp name="Assertion.test_type">8</intProp>
|
||||||
</ResponseAssertion>
|
</ResponseAssertion>
|
||||||
<hashTree/>
|
<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>
|
</hashTree>
|
||||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Repayment">
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Repayment">
|
||||||
<stringProp name="HTTPSampler.domain">${BASE_URL}</stringProp>
|
<stringProp name="HTTPSampler.domain">${BASE_URL}</stringProp>
|
||||||
@@ -358,19 +426,13 @@
|
|||||||
<elementProp name="" elementType="HTTPArgument">
|
<elementProp name="" elementType="HTTPArgument">
|
||||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||||
<stringProp name="Argument.value">{
|
<stringProp name="Argument.value">{
|
||||||
"requestId": "R${__time()}",
|
"msisdn": "3451342",
|
||||||
"countryCode": "${countryCode}",
|
|
||||||
"transactionId": "${transactionId}",
|
|
||||||
"debtId": "${debtId}",
|
"debtId": "${debtId}",
|
||||||
"countryCode": "NGR",
|
"productId": "101",
|
||||||
|
"transactionId": "TRX${__time()}${__Random(100,999)}",
|
||||||
"customerId": "${CustomerId}",
|
"customerId": "${CustomerId}",
|
||||||
"accountId": "${AccountID}",
|
"accountId": "${AccountID}",
|
||||||
"productId": "${productId}",
|
"channel": "100"
|
||||||
"collectedAmount": "${currentLoanAmount}",
|
|
||||||
"penalCharge": 0,
|
|
||||||
"collectionMethod": 3,
|
|
||||||
"lienAmount": "${currentLoanAmount}",
|
|
||||||
"comment": "Repayment via JMeter test"
|
|
||||||
}</stringProp>
|
}</stringProp>
|
||||||
<stringProp name="Argument.metadata">=</stringProp>
|
<stringProp name="Argument.metadata">=</stringProp>
|
||||||
</elementProp>
|
</elementProp>
|
||||||
@@ -398,7 +460,7 @@
|
|||||||
</ResponseAssertion>
|
</ResponseAssertion>
|
||||||
<hashTree/>
|
<hashTree/>
|
||||||
</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="delimiter">,</stringProp>
|
||||||
<stringProp name="fileEncoding"></stringProp>
|
<stringProp name="fileEncoding"></stringProp>
|
||||||
<stringProp name="filename">sample_account.csv</stringProp>
|
<stringProp name="filename">sample_account.csv</stringProp>
|
||||||
@@ -448,7 +510,7 @@
|
|||||||
<stringProp name="filename"></stringProp>
|
<stringProp name="filename"></stringProp>
|
||||||
</ResultCollector>
|
</ResultCollector>
|
||||||
<hashTree/>
|
<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>
|
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||||
<objProp>
|
<objProp>
|
||||||
<name>saveConfig</name>
|
<name>saveConfig</name>
|
||||||
|
|||||||
Reference in New Issue
Block a user