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
ce9988ca
Commit
ce9988ca
authored
Jul 11, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
ffe2f9b7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
65 deletions
+102
-65
兑吧新实物_兑换流程测试_ExchangeTest.java
...va/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
+3
-1
自有新实物_兑换流程测试_ExchangeTest.java
...ses/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
+38
-6
gawService.java
src/test/java/http/service/app/gawService.java
+61
-58
No files found.
src/test/java/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
View file @
ce9988ca
...
...
@@ -466,9 +466,11 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
logger
.
info
(
"校验新实物确认下单页正确"
);
}
}
...
...
src/test/java/http/cases/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
View file @
ce9988ca
...
...
@@ -61,7 +61,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
}
@Test
(
description
=
"
兑吧
新自有实物每人限购---每天限制"
)
@Test
(
description
=
"新自有实物每人限购---每天限制"
)
public
void
每人限购每天限购限制
()
throws
Exception
{
String
appItemId
=
"193752"
;
String
itemId
=
"null"
;
...
...
@@ -115,7 +115,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
}
@Test
(
description
=
"
兑吧
新自有实物每人限购---永久限制"
)
@Test
(
description
=
"新自有实物每人限购---永久限制"
)
public
void
每人限购永久限购限制
()
throws
Exception
{
String
appItemId
=
"193802"
;
String
itemId
=
"null"
;
...
...
@@ -169,7 +169,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
}
@Test
(
description
=
"
兑吧
新自有实物每人限购---周期限制"
)
@Test
(
description
=
"新自有实物每人限购---周期限制"
)
public
void
每人限购周期限制
()
throws
Exception
{
String
appItemId
=
"193803"
;
String
itemId
=
"null"
;
...
...
@@ -221,7 +221,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test
(
description
=
"
兑吧
新自有实物每日限量"
)
@Test
(
description
=
"新自有实物每日限量"
)
public
void
每日限量限制
()
throws
Exception
{
String
appItemId
=
"193804"
;
String
itemId
=
"null"
;
...
...
@@ -321,7 +321,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test
(
description
=
"
兑吧
新自有实物--库存限制"
)
@Test
(
description
=
"新自有实物--库存限制"
)
public
void
库存限制
()
throws
Exception
{
String
appItemId
=
"193811"
;
String
itemId
=
"null"
;
...
...
@@ -356,7 +356,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
@Test
(
description
=
"
兑吧
新自有实物会员兑换限制"
)
@Test
(
description
=
"新自有实物会员兑换限制"
)
public
void
会员兑换限制
()
throws
Exception
{
String
appItemId
=
"193810"
;
String
itemId
=
"null"
;
...
...
@@ -381,6 +381,36 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test
(
description
=
"新自有实物用户id修改测试"
)
public
void
实物用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
7204
;
String
appItemId
=
"197041"
;
String
itemId
=
null
;
String
message
=
""
;
//实物兑换
try
{
Response
response
=
gawService
.
objectExchange
(
uid
,
appItemId
,
itemId
);
response
.
prettyPrint
();
}
catch
(
Exception
e
){
message
=
e
.
toString
();
}
logger
.
info
(
message
);
Assert
.
assertTrue
(
message
.
contains
(
"\"desc\":\"无权访问\""
),
"校验message失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"\"success\":false"
),
"校验success失败"
);
logger
.
info
(
"校验实物用户id篡改无法兑换成功"
);
}
//测试使用
//@Test(enabled=true, dataProvider="testdp", threadPoolSize=1, invocationCount=100)
@DataProvider
(
name
=
"testdp"
,
parallel
=
true
)
...
...
@@ -399,6 +429,8 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
};
}
// @Test(enabled=true, dataProvider="testdp", threadPoolSize=1, invocationCount=100)
public
void
test
(
int
uid
)
throws
Exception
{
// System.out.println("Current Thread Id: " + Thread.currentThread().getId() + ". Dataprovider number: "+ dpNumber);
...
...
src/test/java/http/service/app/gawService.java
View file @
ce9988ca
This diff is collapsed.
Click to expand it.
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