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
198d1e3f
Commit
198d1e3f
authored
Nov 28, 2018
by
钱雯君
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into qwj_181029
parents
968f75f4
0a36c39b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
29 deletions
+39
-29
Postman.java
src/test/java/base/Postman.java
+14
-0
TestReport.java
src/test/java/base/TestReport.java
+0
-2
集卡规则_中奖属性配置_DuibaTest.java
...ava/http/cases/CollectRuleTest/集卡规则_中奖属性配置_DuibaTest.java
+1
-1
集卡规则_中奖配置测试_DuibaTest.java
...ava/http/cases/CollectRuleTest/集卡规则_中奖配置测试_DuibaTest.java
+1
-1
集卡规则_助力规则配置测试_DuibaTest.java
...a/http/cases/CollectRuleTest/集卡规则_助力规则配置测试_DuibaTest.java
+1
-1
test.java
src/test/java/ui/cases/test.java
+5
-7
duiba.properties
src/test/profiles/aliyun/duiba.properties
+17
-17
No files found.
src/test/java/base/Postman.java
View file @
198d1e3f
...
@@ -8,9 +8,11 @@ import org.apache.http.client.params.ClientPNames;
...
@@ -8,9 +8,11 @@ import org.apache.http.client.params.ClientPNames;
import
org.apache.http.params.CoreConnectionPNames
;
import
org.apache.http.params.CoreConnectionPNames
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.testng.annotations.Test
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
static
io
.
restassured
.
RestAssured
.
given
;
import
static
io
.
restassured
.
RestAssured
.
given
;
...
@@ -21,6 +23,7 @@ import static io.restassured.RestAssured.given;
...
@@ -21,6 +23,7 @@ import static io.restassured.RestAssured.given;
public
class
Postman
{
public
class
Postman
{
static
String
dingdingUrl
=
"https://shark.dui88.com/test/integration"
;
static
String
dingdingUrl
=
"https://shark.dui88.com/test/integration"
;
static
String
testPlatformUrl
=
"http://101.37.27.82:8080/insert"
;
static
String
testPlatformUrl
=
"http://101.37.27.82:8080/insert"
;
static
String
miriaUrl
=
"http://miria-aliyun.duibatest.com.cn/autoTest/finish"
;
//dingdingUrl="http://www.json.cn/";
//dingdingUrl="http://www.json.cn/";
private
static
Logger
logger
=
LogManager
.
getLogger
(
Postman
.
class
);
private
static
Logger
logger
=
LogManager
.
getLogger
(
Postman
.
class
);
public
static
void
send2Dingding
(
Map
result
){
public
static
void
send2Dingding
(
Map
result
){
...
@@ -48,6 +51,11 @@ public class Postman {
...
@@ -48,6 +51,11 @@ public class Postman {
Response
response
=
given
().
contentType
(
ContentType
.
JSON
).
body
(
result
).
post
(
testPlatformUrl
);
Response
response
=
given
().
contentType
(
ContentType
.
JSON
).
body
(
result
).
post
(
testPlatformUrl
);
System
.
out
.
println
(
"自动化数据收集平台响应数据:"
+
response
.
asString
());
System
.
out
.
println
(
"自动化数据收集平台响应数据:"
+
response
.
asString
());
}
}
public
static
void
sendFinish
(
Map
result
){
Response
response
=
given
().
params
(
result
).
get
(
miriaUrl
);
System
.
out
.
println
(
"miria响应结果:"
+
response
.
asString
());
}
public
static
Boolean
getName
(){
public
static
Boolean
getName
(){
Calendar
c
=
Calendar
.
getInstance
();
Calendar
c
=
Calendar
.
getInstance
();
Date
date
=
new
Date
();
Date
date
=
new
Date
();
...
@@ -58,4 +66,10 @@ public class Postman {
...
@@ -58,4 +66,10 @@ public class Postman {
if
(
week_num
%
2
==
0
)
return
true
;
if
(
week_num
%
2
==
0
)
return
true
;
else
return
false
;
else
return
false
;
}
}
public
static
void
main
(
String
[]
args
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"jobName"
,
"duibaSign_interface"
);
sendFinish
(
map
);
}
}
}
src/test/java/base/TestReport.java
View file @
198d1e3f
...
@@ -74,7 +74,6 @@ public class TestReport implements IReporter{
...
@@ -74,7 +74,6 @@ public class TestReport implements IReporter{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
map
.
put
(
"failCase"
,
failCase
);
map
.
put
(
"failCase"
,
failCase
);
// logger.in fo("gson.toJson(ddResult)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System
.
out
.
println
(
"测试结果通知信息:"
+
gson
.
toJson
(
map
));
System
.
out
.
println
(
"测试结果通知信息:"
+
gson
.
toJson
(
map
));
//发送运行结果到自动化数据收集平台
//发送运行结果到自动化数据收集平台
if
(
sendPlatform
)
if
(
sendPlatform
)
...
@@ -84,7 +83,6 @@ public class TestReport implements IReporter{
...
@@ -84,7 +83,6 @@ public class TestReport implements IReporter{
if
(!
noticePerson
){
if
(!
noticePerson
){
map
.
put
(
"names"
,
new
ArrayList
<>());
map
.
put
(
"names"
,
new
ArrayList
<>());
}
}
// logger.info("noticeDD:"+noticeDD);
Postman
.
send2Dingding
(
map
);
Postman
.
send2Dingding
(
map
);
}
}
...
...
src/test/java/http/cases/CollectRuleTest/集卡规则_中奖属性配置_DuibaTest.java
View file @
198d1e3f
...
@@ -122,7 +122,7 @@ public class 集卡规则_中奖属性配置_DuibaTest extends DuibaTestBase {
...
@@ -122,7 +122,7 @@ public class 集卡规则_中奖属性配置_DuibaTest extends DuibaTestBase {
//校验修改内容
//校验修改内容
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_clcard_config where id =?"
,
newId
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_clcard_config where id =?"
,
newId
);
Assert
.
assertEquals
(
selectResult
.
get
(
"deleted"
).
toString
(),
"
true
"
,
"删除中奖条件失败"
);
Assert
.
assertEquals
(
selectResult
.
get
(
"deleted"
).
toString
(),
"
1
"
,
"删除中奖条件失败"
);
logger
.
info
(
"校验删除属性配置成功"
);
logger
.
info
(
"校验删除属性配置成功"
);
}
}
...
...
src/test/java/http/cases/CollectRuleTest/集卡规则_中奖配置测试_DuibaTest.java
View file @
198d1e3f
...
@@ -299,7 +299,7 @@ public class 集卡规则_中奖配置测试_DuibaTest extends DuibaTestBase {
...
@@ -299,7 +299,7 @@ public class 集卡规则_中奖配置测试_DuibaTest extends DuibaTestBase {
//校验修改内容
//校验修改内容
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_clcard_config where id =?"
,
newId
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_clcard_config where id =?"
,
newId
);
Assert
.
assertEquals
(
selectResult
.
get
(
"deleted"
).
toString
(),
"
true
"
,
"删除中奖条件失败"
);
Assert
.
assertEquals
(
selectResult
.
get
(
"deleted"
).
toString
(),
"
1
"
,
"删除中奖条件失败"
);
}
}
...
...
src/test/java/http/cases/CollectRuleTest/集卡规则_助力规则配置测试_DuibaTest.java
View file @
198d1e3f
...
@@ -158,7 +158,7 @@ public class 集卡规则_助力规则配置测试_DuibaTest extends DuibaTestBa
...
@@ -158,7 +158,7 @@ public class 集卡规则_助力规则配置测试_DuibaTest extends DuibaTestBa
//校验修改内容
//校验修改内容
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_clcard_config_goods_rules where id =?"
,
newGoodsRuleId
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_clcard_config_goods_rules where id =?"
,
newGoodsRuleId
);
Assert
.
assertEquals
(
selectResult
.
get
(
"deleted"
).
toString
(),
"
true
"
,
"删除中奖条件失败"
);
Assert
.
assertEquals
(
selectResult
.
get
(
"deleted"
).
toString
(),
"
1
"
,
"删除中奖条件失败"
);
logger
.
info
(
"删除集卡助力规则成功"
);
logger
.
info
(
"删除集卡助力规则成功"
);
}
}
...
...
src/test/java/ui/cases/test.java
View file @
198d1e3f
...
@@ -22,8 +22,10 @@ import ui.common.WebDriverType;
...
@@ -22,8 +22,10 @@ import ui.common.WebDriverType;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.sql.SQLException
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Map
;
import
static
com
.
codeborne
.
selenide
.
Condition
.
text
;
import
static
com
.
codeborne
.
selenide
.
Condition
.
text
;
import
static
com
.
codeborne
.
selenide
.
Selenide
.
$
;
import
static
com
.
codeborne
.
selenide
.
Selenide
.
$
;
...
@@ -62,13 +64,9 @@ public class test extends DuibaBaseUi {
...
@@ -62,13 +64,9 @@ public class test extends DuibaBaseUi {
}
}
@Test
@Test
public
void
test1
(){
public
void
test1
()
throws
SQLException
{
open
(
"https://www.biying.com"
);
Map
<
String
,
Object
>
map
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_bet_group_relation where bet_id = 1232"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
}
}
@Test
@Test
...
...
src/test/profiles/aliyun/duiba.properties
View file @
198d1e3f
...
@@ -28,43 +28,43 @@ db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/?tinyInt
...
@@ -28,43 +28,43 @@ db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/?tinyInt
db.driver
=
com.mysql.cj.jdbc.Driver
db.driver
=
com.mysql.cj.jdbc.Driver
db.maxtotal
=
6
db.maxtotal
=
6
//
钉钉报告配置
//
\u9489\u9489\u62A5\u544A\u914D\u7F6E
pluginTest.project
=
插件
pluginTest.project
=
\u
63D2
\u
4EF6
pluginTest.names
=
zhaoran,qianwenjun
pluginTest.names
=
zhaoran,qianwenjun
pluginTest.group
=
插件-接口自动化
pluginTest.group
=
\u
63D2
\u
4EF6-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
pluginTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaPlugin_interface/HTML_Report/suite1_test1_results.html
pluginTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaPlugin_interface/HTML_Report/suite1_test1_results.html
signTest.project
=
签到
signTest.project
=
\u
7B7E
\u5230
signTest.names
=
zhousongbo
signTest.names
=
zhousongbo
signTest.group
=
签到-接口自动化
signTest.group
=
\u
7B7E
\u5230
-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
signTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaSign_interface/HTML_Report/suite1_test1_results.html
signTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaSign_interface/HTML_Report/suite1_test1_results.html
FloorTest.project
=
楼层
FloorTest.project
=
\u
697C
\u
5C42
FloorTest.names
=
zhaoran,qianwenjun
FloorTest.names
=
zhaoran,qianwenjun
FloorTest.group
=
楼层-接口自动化
FloorTest.group
=
\u
697C
\u
5C42-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
FloorTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaFloor_interface/HTML_Report/suite1_test1_results.html
FloorTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaFloor_interface/HTML_Report/suite1_test1_results.html
DuibaTest.project
=
活动工具
DuibaTest.project
=
\u
6D3B
\u
52A8
\u
5DE5
\u5177
DuibaTest.names
=
zhaoran,qianwenjun
DuibaTest.names
=
zhaoran,qianwenjun
DuibaTest.group
=
活动工具-接口自动化
DuibaTest.group
=
\u
6D3B
\u
52A8
\u
5DE5
\u5177
-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
DuibaTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duiba_interface/HTML_Report/suite1_test1_results.html
DuibaTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duiba_interface/HTML_Report/suite1_test1_results.html
AccessTest.project
=
综合业务(单品抽奖/秒杀/游戏
)
AccessTest.project
=
\u
7EFC
\u5408\u
4E1A
\u
52A1(
\u5355\u
54C1
\u
62BD
\u5956
/
\u
79D2
\u6740
/
\u
6E38
\u
620F
)
AccessTest.names
=
zhaoran,qianwenjun
AccessTest.names
=
zhaoran,qianwenjun
AccessTest.group
=
综合业务-接口自动化
AccessTest.group
=
\u
7EFC
\u5408\u
4E1A
\u
52A1-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
AccessTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html
AccessTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html
JenkinsTest.project
=
综合业务(单品抽奖/秒杀/游戏
)
JenkinsTest.project
=
\u
7EFC
\u5408\u
4E1A
\u
52A1(
\u5355\u
54C1
\u
62BD
\u5956
/
\u
79D2
\u6740
/
\u
6E38
\u
620F
)
JenkinsTest.names
=
zhaoran,qianwenjun
JenkinsTest.names
=
zhaoran,qianwenjun
JenkinsTest.group
=
综合业务-接口自动化
JenkinsTest.group
=
\u
7EFC
\u5408\u
4E1A
\u
52A1-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
JenkinsTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html
JenkinsTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html
ExchangeTest.project
=
普兑业务
ExchangeTest.project
=
\u
666E
\u5151\u
4E1A
\u
52A1
ExchangeTest.names
=
panyuli
ExchangeTest.names
=
panyuli
ExchangeTest.group
=
普兑业务-接口自动化
ExchangeTest.group
=
\u
666E
\u5151\u
4E1A
\u
52A1-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
ExchangeTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaExchange_interface/HTML_Report/suite1_test1_results.html
ExchangeTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/duibaExchange_interface/HTML_Report/suite1_test1_results.html
SeckillTest.project
=
秒杀业务
SeckillTest.project
=
\u
79D2
\u6740\u
4E1A
\u
52A1
SeckillTest.names
=
qianwenjun
SeckillTest.names
=
qianwenjun
SeckillTest.group
=
秒杀业务-接口自动化
SeckillTest.group
=
\u
79D2
\u6740\u
4E1A
\u
52A1-
\u
63A5
\u
53E3
\u
81EA
\u
52A8
\u5316
SeckillTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/Seckill_interface/HTML_Report/suite1_test1_results.html
SeckillTest.resultUrl
=
http://tst.deploy.dui88.com/view/duibaTest/job/Seckill_interface/HTML_Report/suite1_test1_results.html
\ No newline at end of file
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