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
cd6fd695
Commit
cd6fd695
authored
Jan 16, 2019
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
5e485e0a
4b227f11
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
31 deletions
+30
-31
DingdingResult.java
src/test/java/base/DingdingResult.java
+11
-29
实物_Activity_ui.java
src/test/java/ui/cases/Activity/实物_Activity_ui.java
+2
-1
首页插件_Plugin_ui.java
src/test/java/ui/cases/Plugin/首页插件_Plugin_ui.java
+3
-0
Activity_egg_Page.java
src/test/java/ui/service/Activity_egg_Page.java
+6
-1
TakePrizeNewPage.java
src/test/java/ui/service/TakePrizeNewPage.java
+2
-0
duiba.properties
src/test/profiles/aliyun/duiba.properties
+6
-0
No files found.
src/test/java/base/DingdingResult.java
View file @
cd6fd695
...
...
@@ -66,33 +66,6 @@ public class DingdingResult {
changes
=
changes
+
" 提交者:"
+
gitlabProjectMerges
.
getAuthor
().
getName
()+
" 描述:"
+
gitlabProjectMerges
.
getDescription
();
/*从jenkins上获取项目变更
Map<String,String> resentChanges=BeTested.getChangesWithin(30,changeMap);
System.out.println(resentChanges);
if(resentChanges!=null&&resentChanges.size()>0){
List<String> changeList=new ArrayList<>();
for(Object key:resentChanges.keySet().toArray()){
//changeList.add(key+"-"+resentChanges.get(key));
if(changes!=null&&changes.length()>0){
changes=changes+","+key+"-"+resentChanges.get(key);
}else
changes=key+"-"+resentChanges.get(key);
}
//group=changeList.toArray();
//this.changes=changeList.toString();
}else {
if(changeMap==null){
this.changes="";
}else {
Set<String> keySet = changeMap.keySet();
this.changes = keySet.toArray()[0] + "-" + changeMap.get(keySet.toArray()[0]);
}
}
if(changes.length()>140){
changes=changes.substring(0,141)+"……";
}
*/
this
.
total
=
total
;
this
.
passCount
=
passCount
;
this
.
skipCount
=
skipCount
;
...
...
@@ -113,8 +86,10 @@ public class DingdingResult {
public
Map
<
String
,
Object
>
getResult
()
throws
UnsupportedEncodingException
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Object
[]
mygroup
=
new
Object
[
1
];
mygroup
[
0
]=
getByRun
(
run
,
"group"
);
result
.
put
(
"group"
,
mygroup
);
String
[]
mygroups
=
new
String
[
1
];
mygroups
[
0
]=
getByRun
(
run
,
"group"
);
System
.
out
.
println
(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~group:"
+
mygroups
[
0
]);
result
.
put
(
"group"
,
mygroups
);
result
.
put
(
"project"
,
project
);
result
.
put
(
"total"
,
this
.
total
);
result
.
put
(
"passCount"
,
this
.
passCount
);
...
...
@@ -164,7 +139,14 @@ public class DingdingResult {
}
public
String
getByRun
(
String
run
,
String
type
)
throws
UnsupportedEncodingException
{
run
=
run
.
substring
(
run
.
indexOf
(
"_"
)+
1
,
run
.
indexOf
(
"."
));
System
.
out
.
println
(
"before runs:"
+
run
);
System
.
out
.
println
(
"run+\".\"+type:"
+
run
+
"."
+
type
);
if
((
run
+
"."
+
type
).
equals
(
"ui.group"
))
return
"ui自动化测试"
;
run
=
this
.
env
.
getProperty
(
run
+
"."
+
type
);
// System.out.println("(runs+\".\"+type):"+run+"."+type);
// System.out.println("runs:"+run);
System
.
out
.
println
(
"run:"
+
run
);
return
new
String
(
run
.
getBytes
(
"ISO-8859-1"
),
"UTF-8"
);
//ISO-8859-1
}
...
...
src/test/java/ui/cases/Activity/实物_Activity_ui.java
View file @
cd6fd695
...
...
@@ -24,7 +24,8 @@ public class 实物_Activity_ui extends DuibaBaseUi{
new
Activity_egg_Page
(
"立即领奖"
,
this
);
new
TakePrizeNewPage
(
"马上领取"
,
this
);
sleep
(
2
);
sleep
(
10
);
screenshot
();
Assert
.
assertTrue
(
isExistByText
(
"收货人:uitest "
),
"出奖弹层校验失败"
);
...
...
src/test/java/ui/cases/Plugin/首页插件_Plugin_ui.java
View file @
cd6fd695
...
...
@@ -18,10 +18,13 @@ public class 首页插件_Plugin_ui extends DuibaBaseUi{
screenshot
();
refresh
();
sleep
(
2
);
screenshot
();
clickByClass
(
"plugin-open"
);
clickByClass
(
"plugin-img"
);
sleep
(
2
);
screenshot
();
Assert
.
assertTrue
(
isExistByText
(
"ui自动化-优惠券(活动)"
));
Assert
.
assertTrue
(
isExistByText
(
"券码:"
));
Assert
.
assertTrue
(
isExistByText
(
"1111111"
));
...
...
src/test/java/ui/service/Activity_egg_Page.java
View file @
cd6fd695
...
...
@@ -10,9 +10,14 @@ public class Activity_egg_Page {
father
.
sleep
(
3
);
father
.
clickByClass
(
"egg"
);
father
.
sleep
(
2
);
father
.
screenshot
();
if
(
name
!=
null
)
father
.
clickByTextEqual
(
name
);
if
(
name
!=
null
){
father
.
clickByTextEqual
(
name
);
father
.
screenshot
();
}
}
}
src/test/java/ui/service/TakePrizeNewPage.java
View file @
cd6fd695
...
...
@@ -10,6 +10,8 @@ public class TakePrizeNewPage {
public
TakePrizeNewPage
(
String
name
,
DuibaBaseUi
father
)
throws
Exception
{
father
.
sleep
(
2
);
father
.
clickByTextEqual
(
name
);
father
.
sleep
(
2
);
father
.
screenshot
();
father
.
clickByTextEqual
(
"确定"
);
}
...
...
src/test/profiles/aliyun/duiba.properties
View file @
cd6fd695
...
...
@@ -75,3 +75,9 @@ SeckillTest.names=qianwenjun
SeckillTest.group
=
秒杀业务-接口自动化
SeckillTest.resultUrl
=
http://tst-idc.deploy.dui88.com/view/duibaTest/job/Seckill_interface/HTML_20Report/suite1_test1_results.html
SeckillTest.job
=
Seckill_interface
ui.project
=
界面自动化核心业务
ui.names
=
mabo
ui.group
=
自动化
ui.resultUrl
=
http://101.68.72.146:18080/job/duiba_ui/HTML_20Report/suite1_test1_results.html
ui.job
=
duiba_ui
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