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
3b318b29
Commit
3b318b29
authored
Dec 24, 2018
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
ef6afeaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
1 deletion
+57
-1
购物车测试.java
src/test/java/http/cases/SaasDeveloperTest/购物车测试.java
+56
-0
MallService.java
src/test/java/http/service/Saas/MallService.java
+1
-1
No files found.
src/test/java/http/cases/SaasDeveloperTest/购物车测试.java
0 → 100644
View file @
3b318b29
/**
* Copyright (C), 2015-2018
* FileName: 购物车测试
* Author: zhaoran
* Date: 2018/12/10 19:45
* Description:
*/
package
http
.
cases
.
SaasDeveloperTest
;
import
base.DuibaLog
;
import
base.DuibaTestBase
;
import
http.service.Activity.PkService
;
import
http.service.Authorization
;
import
http.service.Saas.MallService
;
import
io.restassured.response.Response
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.testng.Assert
;
import
org.testng.annotations.DataProvider
;
import
org.testng.annotations.Test
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
io
.
restassured
.
RestAssured
.
given
;
public
class
购物车测试
extends
DuibaTestBase
{
@Value
(
"${activity.host}"
)
String
activityHost
;
@Autowired
MallService
mallService
;
@Autowired
Authorization
authorization
;
private
DuibaLog
logger
=
DuibaLog
.
getLogger
();
private
static
Integer
uid
=
5415
;
@Test
public
void
加入购物车
()
throws
Exception
{
//获取当前购物车数量
Response
response
=
mallService
.
getMallCount
(
uid
);
response
.
prettyPrint
();
logger
.
info
(
"购物车当前的数量为:"
+
response
.
jsonPath
().
getString
(
"data.trolleyItemCount"
));
}
}
\ No newline at end of file
src/test/java/http/service/Saas/
m
allService.java
→
src/test/java/http/service/Saas/
M
allService.java
View file @
3b318b29
...
...
@@ -22,7 +22,7 @@ import static io.restassured.RestAssured.given;
*/
@Service
public
class
m
allService
{
public
class
M
allService
{
@Value
(
"${activity.host}"
)
String
activityHost
;
...
...
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