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
7903729d
Commit
7903729d
authored
Nov 02, 2018
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
9bfa6ec4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
开发者不可见测试_DuibaTest.java
...t/java/http/cases/NewActivityTest/开发者不可见测试_DuibaTest.java
+50
-0
No files found.
src/test/java/http/cases/NewActivityTest/开发者不可见测试_DuibaTest.java
0 → 100644
View file @
7903729d
package
http
.
cases
.
NewActivityTest
;
import
base.Config
;
import
base.DuibaLog
;
import
http.service.Activity.NewActivityService
;
import
http.service.hd.DeveloperService
;
import
io.restassured.response.Response
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.testng.AbstractTestNGSpringContextTests
;
import
org.testng.Assert
;
import
org.testng.annotations.DataProvider
;
import
org.testng.annotations.Test
;
import
utils.MatcherString
;
import
java.lang.reflect.Method
;
/**
* Created by zhaoran on 2018/11/02
*/
@ContextConfiguration
(
classes
=
Config
.
class
)
public
class
开发者不可见测试
_DuibaTest
extends
AbstractTestNGSpringContextTests
{
@Autowired
NewActivityService
newActivityService
;
@Autowired
DeveloperService
developerService
;
private
static
DuibaLog
logger
=
DuibaLog
.
getLogger
();
@Test
(
description
=
"手机端活动应正常打开"
)
public
void
页面访问测试
()
throws
Exception
{
//访问活动界面
Response
response
=
newActivityService
.
index
(
"35374"
);
//判断结果
Assert
.
assertEquals
(
MatcherString
.
getString
(
response
.
asString
(),
"<title>(.*?)</title>\n"
,
1
),
"【自动化】开发者不可见"
,
"活动页打开异常!"
);
logger
.
info
(
"活动页面打开成功"
);
}
@Test
(
description
=
"开发者端活动应不可见"
)
public
void
开发者活动不可见
()
throws
Exception
{
Response
response
=
developerService
.
list2
(
"【自动化】开发者不可见"
);
Assert
.
assertEquals
(
response
.
asString
().
contains
(
"【自动化】开发者不可见"
),
false
,
"校验活动title失败"
);
logger
.
info
(
"校验title成功"
);
}
}
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