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
70df5581
Commit
70df5581
authored
Nov 27, 2018
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
160402d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
Postman.java
src/test/java/base/Postman.java
+14
-0
TestReport.java
src/test/java/base/TestReport.java
+0
-2
test.java
src/test/java/ui/cases/test.java
+5
-7
duiba.properties
src/test/profiles/aliyun/duiba.properties
+1
-1
No files found.
src/test/java/base/Postman.java
View file @
70df5581
...
...
@@ -8,9 +8,11 @@ import org.apache.http.client.params.ClientPNames;
import
org.apache.http.params.CoreConnectionPNames
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.testng.annotations.Test
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
io
.
restassured
.
RestAssured
.
given
;
...
...
@@ -21,6 +23,7 @@ import static io.restassured.RestAssured.given;
public
class
Postman
{
static
String
dingdingUrl
=
"https://shark.dui88.com/test/integration"
;
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/";
private
static
Logger
logger
=
LogManager
.
getLogger
(
Postman
.
class
);
public
static
void
send2Dingding
(
Map
result
){
...
...
@@ -48,6 +51,11 @@ public class Postman {
Response
response
=
given
().
contentType
(
ContentType
.
JSON
).
body
(
result
).
post
(
testPlatformUrl
);
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
(){
Calendar
c
=
Calendar
.
getInstance
();
Date
date
=
new
Date
();
...
...
@@ -58,4 +66,10 @@ public class Postman {
if
(
week_num
%
2
==
0
)
return
true
;
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 @
70df5581
...
...
@@ -74,7 +74,6 @@ public class TestReport implements IReporter{
e
.
printStackTrace
();
}
map
.
put
(
"failCase"
,
failCase
);
// logger.in fo("gson.toJson(ddResult)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System
.
out
.
println
(
"测试结果通知信息:"
+
gson
.
toJson
(
map
));
//发送运行结果到自动化数据收集平台
if
(
sendPlatform
)
...
...
@@ -84,7 +83,6 @@ public class TestReport implements IReporter{
if
(!
noticePerson
){
map
.
put
(
"names"
,
new
ArrayList
<>());
}
// logger.info("noticeDD:"+noticeDD);
Postman
.
send2Dingding
(
map
);
}
...
...
src/test/java/ui/cases/test.java
View file @
70df5581
...
...
@@ -22,8 +22,10 @@ import ui.common.WebDriverType;
import
java.io.File
;
import
java.io.IOException
;
import
java.sql.SQLException
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Map
;
import
static
com
.
codeborne
.
selenide
.
Condition
.
text
;
import
static
com
.
codeborne
.
selenide
.
Selenide
.
$
;
...
...
@@ -62,13 +64,9 @@ public class test extends DuibaBaseUi {
}
@Test
public
void
test1
(){
open
(
"https://www.biying.com"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
Reporter
.
log
(
"rererfddfdfdfdfdfdf"
);
public
void
test1
()
throws
SQLException
{
Map
<
String
,
Object
>
map
=
jdbc
.
findSimpleResult
(
"select * from act_com_conf.tb_bet_group_relation where bet_id = 1232"
);
}
@Test
...
...
src/test/profiles/aliyun/duiba.properties
View file @
70df5581
...
...
@@ -24,7 +24,7 @@ trade.host = activity.m.duibatest.com.cn
//\u6570\u636E\u5E93\u914D\u7F6E
db.name
=
duiba_test
db.password
=
svbP3KUw2PurAnBb2rbs3vohF
db.url
=
jdbc:mysql://
rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306
/?tinyInt1isBit=false
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