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
f0c23fff
Commit
f0c23fff
authored
Nov 29, 2018
by
钱雯君
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
e8f612ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
天天秒杀_秒杀活动兑换测试_SeckillTest.java
...ava/http/cases/SeckillTest/天天秒杀_秒杀活动兑换测试_SeckillTest.java
+7
-4
EditManagerInfoService.java
...est/java/http/service/Manager/EditManagerInfoService.java
+1
-2
No files found.
src/test/java/http/cases/SeckillTest/天天秒杀_秒杀活动兑换测试_SeckillTest.java
View file @
f0c23fff
...
@@ -11,6 +11,7 @@ import base.DuibaLog;
...
@@ -11,6 +11,7 @@ import base.DuibaLog;
import
base.DuibaTestBase
;
import
base.DuibaTestBase
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
http.service.Authorization
;
import
http.service.Authorization
;
import
http.service.Manager.EditManagerInfoService
;
import
http.service.Manager.EditManagerInfoService
;
import
http.service.app.SeckillService
;
import
http.service.app.SeckillService
;
...
@@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
utils.GetCookieUtil
;
import
utils.MatcherString
;
import
utils.MatcherString
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -178,12 +180,13 @@ public class 天天秒杀_秒杀活动兑换测试_SeckillTest extends DuibaTest
...
@@ -178,12 +180,13 @@ public class 天天秒杀_秒杀活动兑换测试_SeckillTest extends DuibaTest
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Response
response
=
editManagerInfoService
.
createUser
(
"qwj测试秒杀用户"
);
Response
response
=
editManagerInfoService
.
createUser
(
"qwj测试秒杀用户"
);
Map
<
String
,
Object
>
user
=
jdbc
.
findSimpleResult
(
"select * from dafuweng.user where name = 'qwj测试秒杀用户' and app_id = '67'\n"
);
Map
<
String
,
Object
>
user
=
jdbc
.
findSimpleResult
(
"select * from dafuweng.user where name = 'qwj测试秒杀用户' and app_id = '67'\n"
);
String
uid
=
user
.
get
(
"id"
).
toString
();
String
uid
=
user
.
get
(
"id"
).
toString
();
String
url
=
"http://47.97.214.108/user/loginDuiba?uid="
+
uid
;
String
url
=
GetCookieUtil
.
genUrl
(
uid
,
"3erv8LvBxKBSyuGK5i8FSGyYoFD1"
)
;
Response
login
=
given
().
get
(
url
);
JSONObject
cookie
=
GetCookieUtil
.
getConsumerIdFromCookie
(
url
);
Map
<
String
,
Object
>
consumer
=
jdbc
.
findSimpleResult
(
"select * from new_consumer.consumer_0010 where partner_user_id =? and app_id = '18816'\n"
,
uid
);
String
consumerId
=
cookie
.
get
(
"cid"
).
toString
(
);
String
consumerId
=
consumer
.
get
(
"id"
).
toString
();
Boolean
res
=
jdbc
.
update
(
"UPDATE new_consumer.consumer_0010 set addr_name = 'qwj' , addr_phone = '18143476563' ,addr_province = '浙江省' ,addr_city = '杭州市' "
+
Boolean
res
=
jdbc
.
update
(
"UPDATE new_consumer.consumer_0010 set addr_name = 'qwj' , addr_phone = '18143476563' ,addr_province = '浙江省' ,addr_city = '杭州市' "
+
", addr_area = '西湖区' , addr_detail = '奖池花印' where partner_user_id = ? and app_id = '18816'\n"
,
uid
);
", addr_area = '西湖区' , addr_detail = '奖池花印' where partner_user_id = ? and app_id = '18816'\n"
,
uid
);
map
.
put
(
"uid"
,
uid
);
map
.
put
(
"uid"
,
uid
);
...
...
src/test/java/http/service/Manager/EditManagerInfoService.java
View file @
f0c23fff
...
@@ -448,8 +448,7 @@ public class EditManagerInfoService {
...
@@ -448,8 +448,7 @@ public class EditManagerInfoService {
public
Response
createUser
(
String
name
){
public
Response
createUser
(
String
name
){
String
url
=
"http://dafuweng.duibatest.com.cn"
+
"/user/create"
;
String
url
=
"http://47.97.214.108"
+
"/user/create"
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"appId"
,
"67"
);
map
.
put
(
"appId"
,
"67"
);
map
.
put
(
"name"
,
name
);
map
.
put
(
"name"
,
name
);
...
...
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