Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
opt
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
test
opt
Commits
8af3bcda
Commit
8af3bcda
authored
Dec 29, 2021
by
章钰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券发放 提交
parent
88d2e2ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
949 additions
and
0 deletions
+949
-0
autoscript/优惠券发放.jmx
+949
-0
No files found.
autoscript/优惠券发放.jmx
0 → 100644
View file @
8af3bcda
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan
version=
"1.2"
properties=
"5.0"
jmeter=
"5.4.3"
>
<hashTree>
<TestPlan
guiclass=
"TestPlanGui"
testclass=
"TestPlan"
testname=
"测试计划"
enabled=
"true"
>
<stringProp
name=
"TestPlan.comments"
></stringProp>
<boolProp
name=
"TestPlan.functional_mode"
>
false
</boolProp>
<boolProp
name=
"TestPlan.tearDown_on_shutdown"
>
true
</boolProp>
<boolProp
name=
"TestPlan.serialize_threadgroups"
>
true
</boolProp>
<elementProp
name=
"TestPlan.user_defined_variables"
elementType=
"Arguments"
guiclass=
"ArgumentsPanel"
testclass=
"Arguments"
testname=
"用户定义的变量"
enabled=
"true"
>
<collectionProp
name=
"Arguments.arguments"
/>
</elementProp>
<stringProp
name=
"TestPlan.user_define_classpath"
></stringProp>
</TestPlan>
<hashTree>
<ConfigTestElement
guiclass=
"HttpDefaultsGui"
testclass=
"ConfigTestElement"
testname=
"HTTP请求默认值"
enabled=
"true"
>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
guiclass=
"HTTPArgumentsPanel"
testclass=
"Arguments"
testname=
"用户定义的变量"
enabled=
"true"
>
<collectionProp
name=
"Arguments.arguments"
/>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
>
testopt.jwsmed.com
</stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
>
https
</stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
></stringProp>
<stringProp
name=
"HTTPSampler.concurrentPool"
>
6
</stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</ConfigTestElement>
<hashTree/>
<CookieManager
guiclass=
"CookiePanel"
testclass=
"CookieManager"
testname=
"HTTP Cookie管理器"
enabled=
"true"
>
<collectionProp
name=
"CookieManager.cookies"
/>
<boolProp
name=
"CookieManager.clearEachIteration"
>
false
</boolProp>
<boolProp
name=
"CookieManager.controlledByThreadGroup"
>
false
</boolProp>
</CookieManager>
<hashTree/>
<SetupThreadGroup
guiclass=
"SetupThreadGroupGui"
testclass=
"SetupThreadGroup"
testname=
"登录"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<longProp
name=
"ThreadGroup.start_time"
>
1624948929000
</longProp>
<longProp
name=
"ThreadGroup.end_time"
>
1624948929000
</longProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</SetupThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/x-www-form-urlencoded
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"登录"
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"
>
username=yu.zhang
&
password=123456
&
userId=yu.zhang
&
userPwd=123456
&
grant_type=password
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/user/index/ajax/login
</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>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"false"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"723337899"
>
"
code
"
:200
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
2
</intProp>
</ResponseAssertion>
<hashTree/>
<JSONPostProcessor
guiclass=
"JSONPostProcessorGui"
testclass=
"JSONPostProcessor"
testname=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
code
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.code
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null
</stringProp>
<boolProp
name=
"JSONPostProcessor.compute_concat"
>
true
</boolProp>
</JSONPostProcessor>
<hashTree/>
<RegexExtractor
guiclass=
"RegexExtractorGui"
testclass=
"RegexExtractor"
testname=
"提取登录的token"
enabled=
"true"
>
<stringProp
name=
"RegexExtractor.useHeaders"
>
true
</stringProp>
<stringProp
name=
"RegexExtractor.refname"
>
token
</stringProp>
<stringProp
name=
"RegexExtractor.regex"
>
Set-Cookie: SERVITIZATION_BACKEND=(.*?);
</stringProp>
<stringProp
name=
"RegexExtractor.template"
>
$1$
</stringProp>
<stringProp
name=
"RegexExtractor.default"
>
null
</stringProp>
<stringProp
name=
"RegexExtractor.match_number"
>
1
</stringProp>
</RegexExtractor>
<hashTree/>
<BeanShellAssertion
guiclass=
"BeanShellAssertionGui"
testclass=
"BeanShellAssertion"
testname=
"校验登录是否成功"
enabled=
"true"
>
<stringProp
name=
"BeanShellAssertion.query"
>
//校验返回结果状态
String ResponseCode = vars.get(
"
code
"
);
//log.info(
"
获取到的code~~~~~~
"
+ ResponseCode);
if (ResponseCode.equals(
"
200
"
))
{
// 响应码等于200时,设置断言成功,并输出成功信息
Failure = false;
FailureMessage =
"
登录成功
"
;
}
else{
// 响应码不等于200时,设置断言失败,并输出失败信息
Failure = true;
FailureMessage =
"
Response code was not a 200 response code it was
"
+ ResponseCode +
"
.
"
;
print (
"
the return code is
"
+ ResponseCode); // this goes to stdout
log.warn(
"
the return code is
"
+ ResponseCode); // this goes to the JMeter log file
}
String a = vars.get(
"
token
"
);
log.info(
"
获取到的token~~~~~~
"
+ a);
${__setProperty(tokenValue,${token})}
</stringProp>
<stringProp
name=
"BeanShellAssertion.filename"
></stringProp>
<stringProp
name=
"BeanShellAssertion.parameters"
></stringProp>
<boolProp
name=
"BeanShellAssertion.resetInterpreter"
>
false
</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"优惠券自动发放"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<longProp
name=
"ThreadGroup.start_time"
>
1624952371000
</longProp>
<longProp
name=
"ThreadGroup.end_time"
>
1624952371000
</longProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</ThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
cookie
</stringProp>
<stringProp
name=
"Header.value"
>
SERVITIZATION_BACKEND=${__property(tokenValue)}
</stringProp>
</elementProp>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/json
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"搜索可用优惠券获取前两条的id"
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"
>
{
"
page
"
:1,
"
size
"
:10}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/coupon/search?userType=oldBackend
</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>
<boolProp
name=
"HTTPSampler.BROWSER_COMPATIBLE_MULTIPART"
>
true
</boolProp>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</HTTPSamplerProxy>
<hashTree>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"-1283611220"
>
"
code
"
:
"
10000
"
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
<JSONPostProcessor
guiclass=
"JSONPostProcessorGui"
testclass=
"JSONPostProcessor"
testname=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
id0;id1
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.data.list[0].id;$.data.list[1].id
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null;null
</stringProp>
<boolProp
name=
"JSONPostProcessor.compute_concat"
>
true
</boolProp>
</JSONPostProcessor>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"选择发放机构"
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"
>
{
"
page
"
:1,
"
size
"
:10,
"
id
"
:
"
5310
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/agency/search?userType=oldBackend
</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/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"创建发券任务"
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"
>
{
"
startTime
"
:
"
${__time(yyyy-MM-dd HH:mm:ss,)}
"
,
"
couponTakeDtos
"
:[{
"
couponMasterId
"
:${id0},
"
num
"
:2},{
"
couponMasterId
"
:${id1},
"
num
"
:1}],
"
agencyIds
"
:[5310],
"
taskName
"
:
"
自动发券
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
>
utf-8
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/create/batchSendCouponTask?userType=oldBackend
</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/>
<DebugSampler
guiclass=
"TestBeanGUI"
testclass=
"DebugSampler"
testname=
"调试取样器"
enabled=
"false"
>
<boolProp
name=
"displayJMeterProperties"
>
false
</boolProp>
<boolProp
name=
"displayJMeterVariables"
>
true
</boolProp>
<boolProp
name=
"displaySystemProperties"
>
false
</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"查看自动发券的发券任务"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</ThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
cookie
</stringProp>
<stringProp
name=
"Header.value"
>
SERVITIZATION_BACKEND=${__property(tokenValue)}
</stringProp>
</elementProp>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/json
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"搜索并获取第一条任务的id和状态"
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"
>
{
"
page
"
:1,
"
size
"
:10,
"
taskName
"
:
"
自动发券
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
>
utf-8
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/search?userType=oldBackend
</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=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
taskid;taskstatus
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.data.list[0].id;$.data.list[0].status
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null;null
</stringProp>
</JSONPostProcessor>
<hashTree/>
<BeanShellAssertion
guiclass=
"BeanShellAssertionGui"
testclass=
"BeanShellAssertion"
testname=
"BeanShell断言"
enabled=
"false"
>
<stringProp
name=
"TestPlan.comments"
>
状态从0-2需要点时间
</stringProp>
<stringProp
name=
"BeanShellAssertion.query"
>
//校验返回结果状态
String ResponseStatus = vars.get(
"
taskstatus
"
);
//log.info(
"
获取到的code~~~~~~
"
+ ResponseStatus);
if (ResponseStatus.equals(
"
2
"
))
{
// 响应码等于200时,设置断言成功,并输出成功信息
Failure = false;
FailureMessage =
"
发放成功
"
;
}
else{
// 响应码不等于200时,设置断言失败,并输出失败信息
Failure = true;
FailureMessage =
"
ResponseStatus was not 2 response status it was
"
+ ResponseStatus +
"
.
"
;
print (
"
the return code is
"
+ ResponseStatus); // this goes to stdout
log.warn(
"
the return code is
"
+ ResponseStatus); // this goes to the JMeter log file
}
</stringProp>
<stringProp
name=
"BeanShellAssertion.filename"
></stringProp>
<stringProp
name=
"BeanShellAssertion.parameters"
></stringProp>
<boolProp
name=
"BeanShellAssertion.resetInterpreter"
>
false
</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"查看发券任务"
enabled=
"true"
>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
guiclass=
"HTTPArgumentsPanel"
testclass=
"Arguments"
testname=
"用户定义的变量"
enabled=
"true"
>
<collectionProp
name=
"Arguments.arguments"
/>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/get/batchSendCouponTask?id=${taskid}
&
userType=oldBackend
</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>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</HTTPSamplerProxy>
<hashTree>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"-1283611220"
>
"
code
"
:
"
10000
"
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
</hashTree>
<DebugSampler
guiclass=
"TestBeanGUI"
testclass=
"DebugSampler"
testname=
"调试取样器"
enabled=
"false"
>
<boolProp
name=
"displayJMeterProperties"
>
false
</boolProp>
<boolProp
name=
"displayJMeterVariables"
>
true
</boolProp>
<boolProp
name=
"displaySystemProperties"
>
false
</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"新建可删除的发放任务"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<longProp
name=
"ThreadGroup.start_time"
>
1624952371000
</longProp>
<longProp
name=
"ThreadGroup.end_time"
>
1624952371000
</longProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</ThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
cookie
</stringProp>
<stringProp
name=
"Header.value"
>
SERVITIZATION_BACKEND=${__property(tokenValue)}
</stringProp>
</elementProp>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/json
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"搜索可用优惠券获取前两条的id"
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"
>
{
"
page
"
:1,
"
size
"
:10}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/coupon/search?userType=oldBackend
</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>
<boolProp
name=
"HTTPSampler.BROWSER_COMPATIBLE_MULTIPART"
>
true
</boolProp>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</HTTPSamplerProxy>
<hashTree>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"-1283611220"
>
"
code
"
:
"
10000
"
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
<JSONPostProcessor
guiclass=
"JSONPostProcessorGui"
testclass=
"JSONPostProcessor"
testname=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
id0;id1
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.data.list[0].id;$.data.list[1].id
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null;null
</stringProp>
<boolProp
name=
"JSONPostProcessor.compute_concat"
>
true
</boolProp>
</JSONPostProcessor>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"选择发放机构"
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"
>
{
"
page
"
:1,
"
size
"
:10,
"
id
"
:
"
5310
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/agency/search?userType=oldBackend
</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/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"创建发券任务"
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"
>
{
"
startTime
"
:
"
${__timeShift(yyyy-MM-dd HH:mm:ss,,P1D,,)}
"
,
"
couponTakeDtos
"
:[{
"
couponMasterId
"
:${id0},
"
num
"
:2},{
"
couponMasterId
"
:${id1},
"
num
"
:1}],
"
agencyIds
"
:[5310],
"
taskName
"
:
"
删除发券任务
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
>
utf-8
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/create/batchSendCouponTask?userType=oldBackend
</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/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"删除优惠券发放任务"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</ThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
cookie
</stringProp>
<stringProp
name=
"Header.value"
>
SERVITIZATION_BACKEND=${__property(tokenValue)}
</stringProp>
</elementProp>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/json
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"搜索并获取(可删除任务的)第一条任务的id和状态"
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"
>
{
"
page
"
:1,
"
size
"
:10,
"
taskName
"
:
"
删除发券任务
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
>
utf-8
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/search?userType=oldBackend
</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=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
taskid;taskstatus
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.data.list[0].id;$.data.list[0].status
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null;null
</stringProp>
</JSONPostProcessor>
<hashTree/>
<BeanShellAssertion
guiclass=
"BeanShellAssertionGui"
testclass=
"BeanShellAssertion"
testname=
"BeanShell断言"
enabled=
"true"
>
<stringProp
name=
"BeanShellAssertion.query"
>
//校验返回结果状态
String ResponseStatus = vars.get(
"
taskstatus
"
);
//log.info(
"
获取到的code~~~~~~
"
+ ResponseStatus);
if (ResponseStatus.equals(
"
0
"
))
{
// 响应码等于200时,设置断言成功,并输出成功信息
Failure = false;
FailureMessage =
"
发放成功
"
;
}
else{
// 响应码不等于200时,设置断言失败,并输出失败信息
Failure = true;
FailureMessage =
"
ResponseStatus was not 0 response status it was
"
+ ResponseStatus +
"
.
"
;
print (
"
the return code is
"
+ ResponseStatus); // this goes to stdout
log.warn(
"
the return code is
"
+ ResponseStatus); // this goes to the JMeter log file
}
</stringProp>
<stringProp
name=
"BeanShellAssertion.filename"
></stringProp>
<stringProp
name=
"BeanShellAssertion.parameters"
></stringProp>
<boolProp
name=
"BeanShellAssertion.resetInterpreter"
>
false
</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"删除任务"
enabled=
"true"
>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
guiclass=
"HTTPArgumentsPanel"
testclass=
"Arguments"
testname=
"用户定义的变量"
enabled=
"true"
>
<collectionProp
name=
"Arguments.arguments"
/>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/close?taskId=${taskid}
&
userType=oldBackend
</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>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</HTTPSamplerProxy>
<hashTree>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"-1283611220"
>
"
code
"
:
"
10000
"
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
</hashTree>
<DebugSampler
guiclass=
"TestBeanGUI"
testclass=
"DebugSampler"
testname=
"调试取样器"
enabled=
"false"
>
<boolProp
name=
"displayJMeterProperties"
>
false
</boolProp>
<boolProp
name=
"displayJMeterVariables"
>
true
</boolProp>
<boolProp
name=
"displaySystemProperties"
>
false
</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"新建可手动发放的任务"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<longProp
name=
"ThreadGroup.start_time"
>
1624952371000
</longProp>
<longProp
name=
"ThreadGroup.end_time"
>
1624952371000
</longProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</ThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
cookie
</stringProp>
<stringProp
name=
"Header.value"
>
SERVITIZATION_BACKEND=${__property(tokenValue)}
</stringProp>
</elementProp>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/json
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"搜索可用优惠券获取前两条的id"
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"
>
{
"
page
"
:1,
"
size
"
:10}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/coupon/search?userType=oldBackend
</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>
<boolProp
name=
"HTTPSampler.BROWSER_COMPATIBLE_MULTIPART"
>
true
</boolProp>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</HTTPSamplerProxy>
<hashTree>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"-1283611220"
>
"
code
"
:
"
10000
"
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
<JSONPostProcessor
guiclass=
"JSONPostProcessorGui"
testclass=
"JSONPostProcessor"
testname=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
id0;id1
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.data.list[0].id;$.data.list[1].id
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null;null
</stringProp>
<boolProp
name=
"JSONPostProcessor.compute_concat"
>
true
</boolProp>
</JSONPostProcessor>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"选择发放机构"
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"
>
{
"
page
"
:1,
"
size
"
:10,
"
id
"
:
"
5310
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/agency/search?userType=oldBackend
</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/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"创建发券任务"
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"
>
{
"
startTime
"
:null,
"
couponTakeDtos
"
:[{
"
couponMasterId
"
:${id0},
"
num
"
:2},{
"
couponMasterId
"
:${id1},
"
num
"
:1}],
"
agencyIds
"
:[5310],
"
taskName
"
:
"
手动发券
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
>
utf-8
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/create/batchSendCouponTask?userType=oldBackend
</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/>
<DebugSampler
guiclass=
"TestBeanGUI"
testclass=
"DebugSampler"
testname=
"调试取样器"
enabled=
"false"
>
<boolProp
name=
"displayJMeterProperties"
>
false
</boolProp>
<boolProp
name=
"displayJMeterVariables"
>
true
</boolProp>
<boolProp
name=
"displaySystemProperties"
>
false
</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"手动触发任务"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
<stringProp
name=
"LoopController.loops"
>
1
</stringProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
1
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
1
</stringProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<boolProp
name=
"ThreadGroup.same_user_on_next_iteration"
>
true
</boolProp>
</ThreadGroup>
<hashTree>
<HeaderManager
guiclass=
"HeaderPanel"
testclass=
"HeaderManager"
testname=
"HTTP信息头管理器"
enabled=
"true"
>
<collectionProp
name=
"HeaderManager.headers"
>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
cookie
</stringProp>
<stringProp
name=
"Header.value"
>
SERVITIZATION_BACKEND=${__property(tokenValue)}
</stringProp>
</elementProp>
<elementProp
name=
""
elementType=
"Header"
>
<stringProp
name=
"Header.name"
>
Content-Type
</stringProp>
<stringProp
name=
"Header.value"
>
application/json
</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"搜索并获取可手动发券的第一条任务的id和状态"
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"
>
{
"
page
"
:1,
"
size
"
:10,
"
taskName
"
:
"
手动发券
"
}
</stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
>
utf-8
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/search?userType=oldBackend
</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=
"JSON提取器"
enabled=
"true"
>
<stringProp
name=
"JSONPostProcessor.referenceNames"
>
taskid;taskstatus
</stringProp>
<stringProp
name=
"JSONPostProcessor.jsonPathExprs"
>
$.data.list[0].id;$.data.list[0].status
</stringProp>
<stringProp
name=
"JSONPostProcessor.match_numbers"
></stringProp>
<stringProp
name=
"JSONPostProcessor.defaultValues"
>
null;null
</stringProp>
</JSONPostProcessor>
<hashTree/>
<BeanShellAssertion
guiclass=
"BeanShellAssertionGui"
testclass=
"BeanShellAssertion"
testname=
"BeanShell断言"
enabled=
"true"
>
<stringProp
name=
"BeanShellAssertion.query"
>
//校验返回结果状态
String ResponseStatus = vars.get(
"
taskstatus
"
);
//log.info(
"
获取到的code~~~~~~
"
+ ResponseStatus);
if (ResponseStatus.equals(
"
0
"
))
{
// 响应码等于200时,设置断言成功,并输出成功信息
Failure = false;
FailureMessage =
"
发放成功
"
;
}
else{
// 响应码不等于200时,设置断言失败,并输出失败信息
Failure = true;
FailureMessage =
"
ResponseStatus was not 0 response status it was
"
+ ResponseStatus +
"
.
"
;
print (
"
the return code is
"
+ ResponseStatus); // this goes to stdout
log.warn(
"
the return code is
"
+ ResponseStatus); // this goes to the JMeter log file
}
</stringProp>
<stringProp
name=
"BeanShellAssertion.filename"
></stringProp>
<stringProp
name=
"BeanShellAssertion.parameters"
></stringProp>
<boolProp
name=
"BeanShellAssertion.resetInterpreter"
>
false
</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"手动发放"
enabled=
"true"
>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
guiclass=
"HTTPArgumentsPanel"
testclass=
"Arguments"
testname=
"用户定义的变量"
enabled=
"true"
>
<collectionProp
name=
"Arguments.arguments"
/>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
/JARVIS-SERVITIZATION-REST/servitization/admin/task/execute?taskId=${taskid}
&
userType=oldBackend
</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>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
</HTTPSamplerProxy>
<hashTree>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"-1283611220"
>
"
code
"
:
"
10000
"
</stringProp>
</collectionProp>
<stringProp
name=
"Assertion.custom_message"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
</hashTree>
<DebugSampler
guiclass=
"TestBeanGUI"
testclass=
"DebugSampler"
testname=
"调试取样器"
enabled=
"false"
>
<boolProp
name=
"displayJMeterProperties"
>
false
</boolProp>
<boolProp
name=
"displayJMeterVariables"
>
true
</boolProp>
<boolProp
name=
"displaySystemProperties"
>
false
</boolProp>
</DebugSampler>
<hashTree/>
</hashTree>
<ResultCollector
guiclass=
"ViewResultsFullVisualizer"
testclass=
"ResultCollector"
testname=
"察看结果树"
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>
true
</samplerData>
<xml>
true
</xml>
<fieldNames>
true
</fieldNames>
<responseHeaders>
true
</responseHeaders>
<requestHeaders>
true
</requestHeaders>
<responseDataOnError>
false
</responseDataOnError>
<saveAssertionResultsFailureMessage>
true
</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>
0
</assertionsResultsToSave>
<bytes>
true
</bytes>
<sentBytes>
true
</sentBytes>
<url>
true
</url>
<fileName>
true
</fileName>
<hostname>
true
</hostname>
<threadCounts>
true
</threadCounts>
<sampleCount>
true
</sampleCount>
<idleTime>
true
</idleTime>
<connectTime>
true
</connectTime>
</value>
</objProp>
<stringProp
name=
"filename"
></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</jmeterTestPlan>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment