Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马博
test-platform
Commits
89f93dd8
Commit
89f93dd8
authored
Jul 04, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dafuwen域名变化
parent
348c15e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
218 additions
and
24 deletions
+218
-24
兑吧老优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
+1
-1
testservice.java
src/test/java/http/service/testservice.java
+5
-0
test.java
src/test/java/ui/cases/test.java
+212
-23
No files found.
src/test/java/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
View file @
89f93dd8
...
...
@@ -468,7 +468,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"status"
),
"success"
,
"校验兑换失败"
);
//再次兑换
Thread
.
sleep
(
3
000
);
Thread
.
sleep
(
5
000
);
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
url
+
"/couponExchange/exchange"
);
response
.
prettyPrint
();
...
...
src/test/java/http/service/testservice.java
View file @
89f93dd8
...
...
@@ -79,4 +79,9 @@ public class testservice extends AbstractTestNGSpringContextTestsDuiba {
//(enabled=true, dataProvider="testdp", threadPoolSize=1, invocationCount=2)
}
@Test
public
void
tesss
(){
}
}
src/test/java/ui/cases/test.java
View file @
89f93dd8
...
...
@@ -123,49 +123,51 @@ public class test extends DuibaBases {
}
@Test
public
void
testsss
()
throws
SQLException
{
int
uid
=
4816
;
//4815 4816
String
activityId
=
"22469"
;
String
oaId
=
"22469"
;
String
consumerId
=
"100355301"
;
//100355300 100355301
int
uid
=
1
;
//4815 4816
//
String activityId ="22469";
//
String oaId="22469";
//
String consumerId = "100355301";//100355300 100355301
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"
activityId"
,
activityId
);
map
.
put
(
"oaId"
,
oaId
);
map
.
put
(
"activityType"
,
"hdtool"
);
map
.
put
(
"consumerId"
,
consumerId
);
map
.
put
(
"token"
,
"1gffs6mq3"
);
map
.
put
(
"
brickConfigId"
,
"120"
);
//
map.put("oaId",oaId);
//
map.put("activityType","hdtool");
//
map.put("consumerId",consumerId);
//
map.put("token","1gffs6mq3");
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
mapCookies
=
new
HashMap
();
mapCookies
.
put
(
"_duibaServiceGroupKey"
,
"miria-562"
);
//
mapCookies.put("_duibaServiceGroupKey","miria-562");
mapCookies
.
putAll
(
authorization
.
dafuwengLoginTest
(
uid
));
Response
response
=
given
().
headers
(
header
).
cookies
(
mapCookies
).
params
(
map
).
post
(
url
+
"/
hdtool
/doJoin"
);
Response
response
=
given
().
headers
(
header
).
cookies
(
mapCookies
).
params
(
map
).
post
(
url
+
"/
aaw/movebrick
/doJoin"
);
response
.
getCookies
();
response
.
prettyPrint
();
String
orderId
=
response
.
jsonPath
().
getString
(
"
orderId
"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"
data
"
);
sleep
(
5000
);
map
.
clear
();
map
.
put
(
"orderId"
,
orderId
);
response
=
given
().
cookies
(
mapCookies
).
params
(
map
).
post
(
url
+
"/hdtool/getOrderStatus"
);
map
.
put
(
"orderNum"
,
orderId
);
map
.
put
(
"brickConfigId"
,
"120"
);
response
=
given
().
cookies
(
mapCookies
).
params
(
map
).
get
(
url
+
"/aaw/movebrick/getOrderStatus"
);
response
.
prettyPrint
();
System
.
out
.
println
(
"---"
+
response
.
asString
());
String
recordId
=
MatcherString
.
getString
(
response
.
asString
(),
"recordId=(.*?)&"
,
1
);
System
.
out
.
println
(
recordId
);
//
String recordId = MatcherString.getString(response.asString(),"recordId=(.*?)&",1);
//
System.out.println(recordId);
map
.
clear
();
map
.
put
(
"alipay"
,
"120039974@qq.com"
);
map
.
put
(
"realname"
,
"mabo"
);
map
.
put
(
"recordId"
,
recordId
);
map
.
put
(
"token"
,
"12mvxkef"
);
response
=
given
().
headers
(
header
).
cookies
(
mapCookies
).
params
(
map
).
post
(
url
+
"/activity/doTakePrize"
);
response
.
prettyPrint
();
//
map.clear();
//
map.put("alipay","120039974@qq.com");
//
map.put("realname","mabo");
//
map.put("recordId",recordId);
//
map.put("token","12mvxkef");
//
response = given().headers(header).cookies(mapCookies).params(map).post(url+"/activity/doTakePrize");
//
response.prettyPrint();
...
...
@@ -206,4 +208,191 @@ public class test extends DuibaBases {
}
@Test
public
void
红包广场
(){
// Map<String,String> map = new HashMap<>();
// map.put("opId","22489");
// map.put("shareCode","11nrktm");
// map.put("uid","4885");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(4885));
// //有拦截日志,接口返回true
// Response response = given().headers(header).cookies(cookie).params(map).post(url+"/aaw/lotterySquare/shareLinkClick");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"opId"
,
"22489"
);
map
.
put
(
"shareCode"
,
"11nrktm"
);
map
.
put
(
"acitivityId"
,
"59"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
4885
));
//有拦截日志,接口返回true
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
post
(
url
+
"/aaw/lotterySquare/bind"
);
response
.
prettyPrint
();
}
@Test
public
void
砍价
(){
// Map<String,String> map = new HashMap<>();
// map.put("goodsId","6");
// map.put("activityId","1");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(4662));
// Response response = given().headers(header).cookies(cookie).params(map).post(url+"/aaw/bargainActivity/doBargain");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"orderId"
,
"246"
);
map
.
put
(
"activityId"
,
"1"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
// header.put("User-Agent","windows mabo");
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
4817
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
post
(
url
+
"/aaw/bargainActivity/helpBargain"
);
response
.
prettyPrint
();
}
@Test
public
void
pk
(){
// Map<String,String> map = new HashMap<>();
// map.put("goodsId","6");
// map.put("activityId","1");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(4662));
// Response response = given().headers(header).cookies(cookie).params(map).post(url+"/aaw/bargainActivity/doBargain");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"betId"
,
"971"
);
map
.
put
(
"optionId"
,
"1916"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
2463
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
post
(
url
+
"/betActivity2/doJoin"
);
response
.
prettyPrint
();
}
@Test
public
void
搬砖工
(){
// Map<String,String> map = new HashMap<>();
// map.put("goodsId","6");
// map.put("activityId","1");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(4662));
// Response response = given().headers(header).cookies(cookie).params(map).post(url+"/aaw/bargainActivity/doBargain");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"brickConfigId"
,
"120"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
// header.put("User-Agent","windows mabo");
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
1
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
post
(
url
+
"/aaw/movebrick/exchange"
);
response
.
prettyPrint
();
}
@Test
public
void
百姓拼团
(){
// Map<String,String> map = new HashMap<>();
// map.put("joinGroupItemId","26");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(2821));
// Response response = given().headers(header).cookies(cookie).params(map).get(url+"/joinGroup/openGroup");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"groupId"
,
"182"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
2852
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
get
(
url
+
"/joinGroup/joinGroup"
);
response
.
prettyPrint
();
}
}
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