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
3bb30736
Commit
3bb30736
authored
Jul 23, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c507d36b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
13 deletions
+17
-13
兑吧老优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
+1
-1
Authorization.java
src/test/java/http/service/Authorization.java
+4
-1
双列图_Cms_ui.java
src/test/java/ui/cases/cms/双列图_Cms_ui.java
+5
-5
商品分组_Cms_ui.java
src/test/java/ui/cases/cms/商品分组_Cms_ui.java
+4
-3
活动分组_Cms_ui.java
src/test/java/ui/cases/cms/活动分组_Cms_ui.java
+3
-3
No files found.
src/test/java/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
View file @
3bb30736
...
@@ -273,7 +273,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
...
@@ -273,7 +273,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
//获取按钮状态
//获取按钮状态
Response
detailResponse
=
mobileService
.
detail
(
authorization
.
dafuwengLogin
(
uid
),
"29180"
);
Response
detailResponse
=
mobileService
.
detail
(
authorization
.
dafuwengLogin
(
uid
),
"29180"
);
detailResponse
.
prettyPrint
();
//
detailResponse.prettyPrint();
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"今日已兑完,明天再来哦(14)"
,
"校验message失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"今日已兑完,明天再来哦(14)"
,
"校验message失败"
);
...
...
src/test/java/http/service/Authorization.java
View file @
3bb30736
...
@@ -7,6 +7,7 @@ import io.restassured.http.ContentType;
...
@@ -7,6 +7,7 @@ import io.restassured.http.ContentType;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.testng.Assert
;
import
utils.SecurityUtils
;
import
utils.SecurityUtils
;
import
java.net.MalformedURLException
;
import
java.net.MalformedURLException
;
...
@@ -62,7 +63,7 @@ public class Authorization {
...
@@ -62,7 +63,7 @@ public class Authorization {
private
Map
<
String
,
String
>
ssoCookies
=
null
;
private
Map
<
String
,
String
>
ssoCookies
=
null
;
//大富翁登录
//大富翁登录
public
Map
dafuwengLogin
(
int
uid
){
public
Map
dafuwengLogin
(
int
uid
)
{
int
i
=
10
;
int
i
=
10
;
Map
<
String
,
String
>
dafuwengCookies
=
null
;
Map
<
String
,
String
>
dafuwengCookies
=
null
;
while
((
dafuwengCookiesMap
.
get
(
uid
)==
null
||
dafuwengCookiesMap
.
get
(
uid
).
size
()==
0
)&&
i
>
0
)
{
while
((
dafuwengCookiesMap
.
get
(
uid
)==
null
||
dafuwengCookiesMap
.
get
(
uid
).
size
()==
0
)&&
i
>
0
)
{
...
@@ -95,6 +96,8 @@ public class Authorization {
...
@@ -95,6 +96,8 @@ public class Authorization {
}
}
if
((
dafuwengCookiesMap
.
get
(
uid
)==
null
||
dafuwengCookiesMap
.
get
(
uid
).
size
()==
0
)){
if
((
dafuwengCookiesMap
.
get
(
uid
)==
null
||
dafuwengCookiesMap
.
get
(
uid
).
size
()==
0
)){
logger
.
info
(
"dafuweng登陆app失败,cookies为null"
);
logger
.
info
(
"dafuweng登陆app失败,cookies为null"
);
Assert
.
assertTrue
(
false
,
"dafuweng登陆失败,请检查dafuweng是否启动"
);
}
}
return
dafuwengCookiesMap
.
get
(
uid
);
return
dafuwengCookiesMap
.
get
(
uid
);
}
}
...
...
src/test/java/ui/cases/cms/双列图_Cms_ui.java
View file @
3bb30736
...
@@ -39,11 +39,11 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
...
@@ -39,11 +39,11 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
sleep
(
2
);
sleep
(
2
);
clickByTextEqual
(
"添加图片"
,
0
);
clickByTextEqual
(
"添加图片"
,
0
);
clickByTextEqual
(
"1.png"
);
clickByTextEqual
(
"1.png"
);
clickByTextEqual
(
"保存"
);
clickByTextEqual
(
"保存"
,
1
);
System
.
out
.
println
(
"ok"
);
System
.
out
.
println
(
"ok"
);
clickByTextEqual
(
"添加图片"
,
1
);
clickByTextEqual
(
"添加图片"
,
1
);
clickByTextEqual
(
"1.png"
);
clickByTextEqual
(
"1.png"
);
clickByTextEqual
(
"保存"
);
clickByTextEqual
(
"保存"
,
1
);
System
.
out
.
println
(
"ok"
);
System
.
out
.
println
(
"ok"
);
clickByTextEqual
(
"添加跳转链接"
,
0
);
clickByTextEqual
(
"添加跳转链接"
,
0
);
...
@@ -58,13 +58,13 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
...
@@ -58,13 +58,13 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
sleep
(
1
);
sleep
(
1
);
inputByXpath
(
"//*[@placeholder=\"请输入文本,20字以内\"]"
,
"test1"
,
0
);
inputByXpath
(
"//*[@placeholder=\"请输入文本,20字以内\"]"
,
"test1"
,
0
);
inputByXpath
(
"//*[@placeholder=\"请输入文本,20字以内\"]"
,
"test2"
,
1
);
inputByXpath
(
"//*[@placeholder=\"请输入文本,20字以内\"]"
,
"test2"
,
1
);
clickByTextEqual
(
"保存"
,
1
);
clickByTextEqual
(
"保存"
,
2
);
sleep
(
4
);
sleep
(
4
);
scrollToTop
();
scrollToTop
();
clickByTextEqual
(
"发布"
);
clickByTextEqual
(
"发布"
);
sleep
(
10
);
sleep
(
10
);
}
}
@Test
(
description
=
"手机端"
)
@Test
(
description
=
"手机端"
,
dependsOnMethods
=
"A"
)
public
void
B
()
throws
Exception
{
public
void
B
()
throws
Exception
{
String
url
=
"http://wechat.duiba.com.cn/dbredirect/dafuweng?dbredirect=%2F%2Factivity.m.duibatest.com.cn%2Fchw%2Fvisual-editor%2Fskins%3Fid%3D134"
;
String
url
=
"http://wechat.duiba.com.cn/dbredirect/dafuweng?dbredirect=%2F%2Factivity.m.duibatest.com.cn%2Fchw%2Fvisual-editor%2Fskins%3Fid%3D134"
;
...
@@ -91,7 +91,7 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
...
@@ -91,7 +91,7 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
}
}
@Test
(
description
=
"删除楼层"
)
@Test
(
description
=
"删除楼层"
,
dependsOnMethods
=
"B"
)
public
void
C
()
throws
Exception
{
public
void
C
()
throws
Exception
{
cmsLoginPage
.
init
(
"15968831723"
,
this
);
cmsLoginPage
.
init
(
"15968831723"
,
this
);
...
...
src/test/java/ui/cases/cms/商品分组_Cms_ui.java
View file @
3bb30736
...
@@ -41,7 +41,8 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
...
@@ -41,7 +41,8 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
inputByXpath
(
"//*[@class=\"el-input el-input--medium\"]//input"
,
"test2"
,
1
);
inputByXpath
(
"//*[@class=\"el-input el-input--medium\"]//input"
,
"test2"
,
1
);
clickByTextEqual
(
"保存"
,
1
);
scrollToTop
();
clickByTextEqual
(
"保存"
,
0
);
sleep
(
5
);
sleep
(
5
);
...
@@ -50,7 +51,7 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
...
@@ -50,7 +51,7 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
clickByTextEqual
(
"发布"
);
clickByTextEqual
(
"发布"
);
sleep
(
10
);
sleep
(
10
);
}
}
@Test
@Test
(
dependsOnMethods
=
"A"
)
public
void
B
()
throws
Exception
{
public
void
B
()
throws
Exception
{
...
@@ -79,7 +80,7 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
...
@@ -79,7 +80,7 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
}
}
@Test
(
description
=
"删除楼层"
)
@Test
(
description
=
"删除楼层"
,
dependsOnMethods
=
"B"
)
public
void
C
()
throws
Exception
{
public
void
C
()
throws
Exception
{
cmsLoginPage
.
init
(
"15968831723"
,
this
);
cmsLoginPage
.
init
(
"15968831723"
,
this
);
...
...
src/test/java/ui/cases/cms/活动分组_Cms_ui.java
View file @
3bb30736
...
@@ -44,13 +44,13 @@ public class 活动分组_Cms_ui extends DuibaBaseUi{
...
@@ -44,13 +44,13 @@ public class 活动分组_Cms_ui extends DuibaBaseUi{
inputByXpath
(
"//*[@class=\"el-input__inner\"]"
,
"test1"
,
1
);
inputByXpath
(
"//*[@class=\"el-input__inner\"]"
,
"test1"
,
1
);
inputByXpath
(
"//*[@class=\"el-input__inner\"]"
,
"test2"
,
3
);
inputByXpath
(
"//*[@class=\"el-input__inner\"]"
,
"test2"
,
3
);
clickByTextEqual
(
"保存"
,
1
);
clickByTextEqual
(
"保存"
,
0
);
sleep
(
5
);
sleep
(
5
);
scrollToTop
();
scrollToTop
();
clickByTextEqual
(
"发布"
);
clickByTextEqual
(
"发布"
);
sleep
(
10
);
sleep
(
10
);
}
}
@Test
(
description
=
"手机端"
)
@Test
(
description
=
"手机端"
,
dependsOnMethods
=
"A"
)
public
void
B
()
throws
Exception
{
public
void
B
()
throws
Exception
{
String
url
=
"http://wechat.duiba.com.cn/dbredirect/dafuweng?dbredirect=%2F%2Factivity.m.duibatest.com.cn%2Fchw%2Fvisual-editor%2Fskins%3Fid%3D134"
;
String
url
=
"http://wechat.duiba.com.cn/dbredirect/dafuweng?dbredirect=%2F%2Factivity.m.duibatest.com.cn%2Fchw%2Fvisual-editor%2Fskins%3Fid%3D134"
;
...
@@ -75,7 +75,7 @@ public class 活动分组_Cms_ui extends DuibaBaseUi{
...
@@ -75,7 +75,7 @@ public class 活动分组_Cms_ui extends DuibaBaseUi{
Assert
.
assertEquals
(
title
,
"活动组测试2"
);
Assert
.
assertEquals
(
title
,
"活动组测试2"
);
}
}
@Test
(
description
=
"删除楼层"
)
@Test
(
description
=
"删除楼层"
,
dependsOnMethods
=
"B"
)
public
void
C
()
throws
Exception
{
public
void
C
()
throws
Exception
{
cmsLoginPage
.
init
(
"15968831723"
,
this
);
cmsLoginPage
.
init
(
"15968831723"
,
this
);
...
...
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