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
818069ce
Commit
818069ce
authored
Jan 03, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库账号密码加密,ui更新
parent
08053af5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
23 deletions
+46
-23
DataSource.java
src/test/java/base/DataSource.java
+3
-3
DuibaBaseUi.java
src/test/java/base/DuibaBaseUi.java
+1
-1
优惠券_Activity_ui.java
src/test/java/ui/cases/Activity/优惠券_Activity_ui.java
+4
-3
实物_Activity_ui.java
src/test/java/ui/cases/Activity/实物_Activity_ui.java
+11
-4
支付宝_Activity_ui.java
src/test/java/ui/cases/Activity/支付宝_Activity_ui.java
+11
-4
虚拟商品_Activity_ui.java
src/test/java/ui/cases/Activity/虚拟商品_Activity_ui.java
+8
-3
实物_ExchangeTest_ui.java
src/test/java/ui/cases/Exchange/实物_ExchangeTest_ui.java
+1
-1
Activity_egg_Page.java
src/test/java/ui/service/Activity_egg_Page.java
+5
-2
duiba.properties
src/test/profiles/aliyun/duiba.properties
+2
-2
No files found.
src/test/java/base/DataSource.java
View file @
818069ce
...
...
@@ -7,7 +7,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
* Created by mabo on 2018/12/27
*/
public
class
DataSource
extends
BasicDataSource
{
private
String
key
=
"
qwertyuiop
"
;
private
String
key
=
"
CNxgrtFG2nYQUfu
"
;
@Override
public
void
setPassword
(
String
password
)
{
password
=
BlowfishUtils
.
decryptBlowfish
(
password
,
key
);
...
...
@@ -22,12 +22,12 @@ public class DataSource extends BasicDataSource {
}
public
static
void
main
(
String
[]
args
)
{
String
s
=
BlowfishUtils
.
encryptBlowfish
(
"
svbP3KUw2PurAnBb2rbs3vohF"
,
"qwertyuiop
"
);
String
s
=
BlowfishUtils
.
encryptBlowfish
(
"
duiba"
,
"CNxgrtFG2nYQUfu
"
);
System
.
out
.
println
(
s
);
//duiba_test
//svbP3KUw2PurAnBb2rbs3vohF
s
=
BlowfishUtils
.
decryptBlowfish
(
s
,
"
qwertyuiop
"
);
s
=
BlowfishUtils
.
decryptBlowfish
(
s
,
"
CNxgrtFG2nYQUfu
"
);
System
.
out
.
println
(
s
);
}
...
...
src/test/java/base/DuibaBaseUi.java
View file @
818069ce
...
...
@@ -120,7 +120,7 @@ public class DuibaBaseUi extends DuibaBase{
int
i
=
5
;
while
(
i
>
0
){
try
{
$
(
By
.
xpath
(
xpath
)
).
click
();
driver
.
findElementByXPath
(
xpath
).
click
();
logger
.
info
(
"ByXpath:"
+
xpath
+
" click"
);
return
;
}
catch
(
Exception
e
)
{
...
...
src/test/java/ui/cases/Activity/优惠券_Activity_ui.java
View file @
818069ce
...
...
@@ -32,11 +32,12 @@ public class 优惠券_Activity_ui extends DuibaBaseUi{
//用户登陆,app 13193311111
new
MoblieLogin
(
"5074"
,
this
);
//手机端楼层
new
HomePage
(
"ui自动化-
活动工具
-优惠券"
,
this
);
new
HomePage
(
"ui自动化-
砸彩蛋
-优惠券"
,
this
);
new
Activity_egg_Page
(
null
,
this
);
sleep
(
2
);
clickByClass
(
"J_gotoDetail logandgo"
);
new
Activity_egg_Page
(
"查看详情"
,
this
);
sleep
(
2
);
Assert
.
assertTrue
(
isExistByText
(
"ui自动化-优惠券(活动)"
));
Assert
.
assertTrue
(
isExistByText
(
"券码:"
));
...
...
src/test/java/ui/cases/Activity/实物_Activity_ui.java
View file @
818069ce
...
...
@@ -6,6 +6,7 @@ import org.testng.annotations.Test;
import
ui.service.Activity_egg_Page
;
import
ui.service.HomePage
;
import
ui.service.MoblieLogin
;
import
ui.service.TakePrizeNewPage
;
import
static
com
.
codeborne
.
selenide
.
Selenide
.
open
;
...
...
@@ -19,13 +20,19 @@ public class 实物_Activity_ui extends DuibaBaseUi{
new
MoblieLogin
(
"5074"
,
this
);
//手机端楼层
new
HomePage
(
"ui自动化-
活动工具
-实物"
,
this
);
new
HomePage
(
"ui自动化-
砸彩蛋
-实物"
,
this
);
new
Activity_egg_Page
(
null
,
this
);
new
Activity_egg_Page
(
"立即领奖"
,
this
);
new
TakePrizeNewPage
(
"马上领取"
,
this
);
sleep
(
2
);
clickByClass
(
"J_gotoDetail logandgo"
);
Assert
.
assertTrue
(
isExistByText
(
"恭喜您,中奖啦"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"收货人:uitest "
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"13111133322"
),
"出奖弹层校验失败"
);
//北京市北京市东城区东华门街道test
Assert
.
assertTrue
(
isExistByText
(
"北京市北京市东城区东华门街道test "
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"待发货"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"ui自动化-实物(活动)"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"订单来源:抽奖"
),
"出奖弹层校验失败"
);
}
}
src/test/java/ui/cases/Activity/支付宝_Activity_ui.java
View file @
818069ce
...
...
@@ -18,12 +18,19 @@ public class 支付宝_Activity_ui extends DuibaBaseUi{
new
MoblieLogin
(
"5074"
,
this
);
//手机端楼层
new
HomePage
(
"ui自动化-
活动工具
-支付宝"
,
this
);
new
HomePage
(
"ui自动化-
砸彩蛋
-支付宝"
,
this
);
new
Activity_egg_Page
(
null
,
this
);
new
Activity_egg_Page
(
"立即领奖"
,
this
);
sleep
(
2
);
clickByClass
(
"J_gotoDetail logandgo"
);
clickByTextEqual
(
"马上领取"
);
clickByTextEqual
(
"确定"
);
Assert
.
assertTrue
(
isExistByText
(
"恭喜您,中奖啦"
),
"出奖弹层校验失败"
);
sleep
(
5
);
Assert
.
assertTrue
(
isExistByText
(
"恭喜您兑换成功"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"充值帐号:"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"peeulk6392@sandbox.com"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"订单状态:"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"成功"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"订单编号:"
),
"出奖弹层校验失败"
);
}
}
src/test/java/ui/cases/Activity/虚拟商品_Activity_ui.java
View file @
818069ce
...
...
@@ -18,13 +18,18 @@ public class 虚拟商品_Activity_ui extends DuibaBaseUi{
new
MoblieLogin
(
"5074"
,
this
);
//手机端楼层
new
HomePage
(
"ui自动化-
活动工具-支付宝
"
,
this
);
new
HomePage
(
"ui自动化-
砸彩蛋-虚拟商品
"
,
this
);
new
Activity_egg_Page
(
null
,
this
);
sleep
(
2
);
new
Activity_egg_Page
(
"查看奖品"
,
this
);
Assert
.
assertTrue
(
isExistByText
(
"恭喜您,中奖啦"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"ui自动化-活动工具-虚拟商品"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"已领奖"
),
"出奖弹层校验失败"
);
Assert
.
assertTrue
(
isExistByText
(
"\n"
+
"\t\t\tui自动化-活动工具-虚拟商品-详细说明\n"
+
"\t\t"
),
"出奖弹层校验失败"
);
}
}
src/test/java/ui/cases/Exchange/实物_ExchangeTest_ui.java
View file @
818069ce
...
...
@@ -40,7 +40,7 @@ public class 实物_ExchangeTest_ui extends DuibaBaseUi{
Assert
.
assertTrue
(
isExistByText
(
"待发货"
));
Assert
.
assertTrue
(
isExistByText
(
"收货人:uitest "
));
Assert
.
assertTrue
(
isExistByText
(
"13111133322"
));
Assert
.
assertTrue
(
isExistByText
(
"北京东城区东华门街道test "
));
Assert
.
assertTrue
(
isExistByText
(
"北京
市北京市
东城区东华门街道test "
));
Assert
.
assertTrue
(
isExistByText
(
"ui自动化-实物"
));
Assert
.
assertTrue
(
isExistByText
(
"\n"
+
" ui自动化-实物-待发货文案\n"
+
...
...
src/test/java/ui/service/Activity_egg_Page.java
View file @
818069ce
...
...
@@ -7,9 +7,12 @@ import base.DuibaBaseUi;
*/
public
class
Activity_egg_Page
{
public
Activity_egg_Page
(
String
name
,
DuibaBaseUi
father
)
throws
Exception
{
father
.
clickByClass
(
"egg jump"
);
if
(
name
!=
null
)
father
.
clickByTextEqual
(
name
);
father
.
sleep
(
3
);
father
.
clickByClass
(
"egg"
);
if
(
name
!=
null
)
father
.
clickByTextEqual
(
name
);
}
}
src/test/profiles/aliyun/duiba.properties
View file @
818069ce
...
...
@@ -22,8 +22,8 @@ manager.host = mng.duibatest.com.cn
trade.host
=
activity.m.duibatest.com.cn
//\u6570\u636E\u5E93\u914D\u7F6E
db.name
=
ELXEVaFBmUzjzP
db.password
=
2
jx72wjghKSJw17hif9nmKg3FU4vBCFwgy1
db.name
=
FjrtzzH
db.password
=
2
Fe36uDap8TMqtfzob3f1u8r2aK8qjdnwPP
db.url
=
jdbc:mysql://47.97.127.67:13001/?tinyInt1isBit=false
db.driver
=
com.mysql.cj.jdbc.Driver
db.maxtotal
=
6
...
...
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