Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
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
龚小红
oto
Commits
f2a7b003
Commit
f2a7b003
authored
Jul 29, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增授权弹窗+准客户管理后台接口
parent
bcaca2bf
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
483 additions
and
222 deletions
+483
-222
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+276
-2
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+11
-3
ExtentTestNGIReporterListener.java
...st/java/com/kjj/config/ExtentTestNGIReporterListener.java
+1
-7
NetworkUtils.java
src/test/java/com/kjj/utils/NetworkUtils.java
+1
-16
liveTestNG.xml
src/test/liveTestNG.xml
+194
-194
No files found.
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
f2a7b003
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
f2a7b003
...
...
@@ -79,7 +79,7 @@ public class BasicConfig {
// 访客(SuYi) userID:4425
public
static
String
VISITOR_UserTku
=
"T3gM31f18jAW2hicRDxbwHFSuwA4MMVLLeHZ5G4yvb3sz6YRdcqKfzRJ8dMnfqDmgS8EprRjhFpXPFLBvp"
;
// 钉钉机器人 线上-告警群
public
static
final
String
DINGTALKPATH
=
"https://oapi.dingtalk.com/robot/send?access_token=f63c9cb36e89dd68e9af82d926933b3afc6544e57b23a3a55ed5b3b772d5e8d2"
;
public
static
final
String
dingTalkPath
=
"https://oapi.dingtalk.com/robot/send?access_token=f63c9cb36e89dd68e9af82d926933b3afc6544e57b23a3a55ed5b3b772d5e8d2"
;
// *************** 客集集域名 ***************
...
...
@@ -343,8 +343,16 @@ public class BasicConfig {
//小程序分享
public
static
final
String
MANAGER_saveOrUpdateMpShare
=
MANAGER_HOST
+
"/kjy/manager/live/share/saveOrUpdateMpShare"
;
public
static
final
String
MANAGER_
=
MANAGER_HOST
+
""
;
// public static final String MANAGER_ = MANAGER_HOST + "";
//授权弹窗配置
public
static
final
String
MANAGER_popupSave
=
MANAGER_HOST
+
"/kjy/manager/live/auth/popup/save"
;
public
static
final
String
MANAGER_popupDetail
=
MANAGER_HOST
+
"/kjy/manager/live/auth/popup/detail"
;
public
static
final
String
MANAGER_popupUpdate
=
MANAGER_HOST
+
"/kjy/manager/live/auth/popup/update"
;
//准客户
public
static
final
String
MANAGER_potentialSaveQues
=
MANAGER_HOST
+
"/kjy/manager/live/potential/saveQues"
;
public
static
final
String
MANAGER_potentialQuesList
=
MANAGER_HOST
+
"/kjy/manager/live/potential/quesList"
;
//客户管理
public
static
final
String
MOBILE_customerList
=
MOBILE_HOST
+
"/kjy/live/agent/customer/list"
;
...
...
src/test/java/com/kjj/config/ExtentTestNGIReporterListener.java
View file @
f2a7b003
...
...
@@ -41,10 +41,9 @@ public class ExtentTestNGIReporterListener implements IReporter {
if
(
result
.
size
()
==
0
)
{
continue
;
}
// 统计suite下的成功、失败
、跳过
的总用例数
// 统计suite下的成功、失败的总用例数
int
suiteFailSize
=
0
;
int
suitePassSize
=
0
;
// int suiteSkipSize = 0;
ExtentTest
suiteTest
=
null
;
// 存在多个suite的情况下,在报告中将同一个suite的测试结果归为一类,创建一级节点。
if
(
createSuiteNode
)
{
...
...
@@ -80,10 +79,8 @@ public class ExtentTestNGIReporterListener implements IReporter {
// 统计SuiteResult下的数据
int
passSize
=
r
.
getTestContext
().
getPassedTests
().
size
();
int
failSize
=
r
.
getTestContext
().
getFailedTests
().
size
();
// int skipSize = r.getTestContext().getSkippedTests().size();
suitePassSize
+=
passSize
;
suiteFailSize
+=
failSize
;
// suiteSkipSize += skipSize;
if
(
failSize
>
0
)
{
resultNode
.
getModel
().
setStatus
(
Status
.
FAIL
);
}
...
...
@@ -129,7 +126,6 @@ public class ExtentTestNGIReporterListener implements IReporter {
htmlReporter
.
config
().
setChartVisibilityOnOpen
(
true
);
//报表位置
htmlReporter
.
config
().
setTestViewChartLocation
(
ChartLocation
.
TOP
);
// htmlReporter.config().setTheme(Theme.STANDARD);
htmlReporter
.
config
().
setCSS
(
".node.level-1 ul{ display:none;} .node.level-1.active ul{display:block;}"
);
extent
=
new
ExtentReports
();
extent
.
attachReporter
(
htmlReporter
);
...
...
@@ -178,8 +174,6 @@ public class ExtentTestNGIReporterListener implements IReporter {
// 作为子节点进行创建时,设置同父节点的标签一致,便于报告检索。
test
=
extenttest
.
createNode
(
name
).
assignCategory
(
categories
);
}
// test.getModel().setDescription(description.toString());
// test = extent.createTest(result.getMethod().getMethodName());
for
(
String
group
:
result
.
getMethod
().
getGroups
())
test
.
assignCategory
(
group
);
...
...
src/test/java/com/kjj/utils/NetworkUtils.java
View file @
f2a7b003
...
...
@@ -16,22 +16,11 @@ public class NetworkUtils {
// 代理人的 cookies和headers
public
Map
<
String
,
Object
>
agentCookies
=
new
HashMap
<
String
,
Object
>();
public
Map
<
String
,
Object
>
getAgentCookies
()
{
return
agentCookies
;
}
public
void
setAgentCookies
(
Map
<
String
,
Object
>
agentCookies
)
{
this
.
agentCookies
=
agentCookies
;
}
public
Map
<
String
,
Object
>
agentHeaders
=
new
HashMap
<
String
,
Object
>();
public
Map
<
String
,
Object
>
getAgentHeaders
()
{
return
agentHeaders
;
}
public
void
setAgentHeaders
(
Map
<
String
,
Object
>
agentHeaders
)
{
this
.
agentHeaders
=
agentHeaders
;
}
public
Map
<
String
,
Object
>
fileHeaders
=
new
HashMap
<
String
,
Object
>();
public
Map
<
String
,
Object
>
getFileHeaders
()
{
return
fileHeaders
;
}
public
void
setFileHeadersHeaders
(
Map
<
String
,
Object
>
fileHeaders
)
{
this
.
fileHeaders
=
fileHeaders
;
}
// 钉钉的 headers
public
Map
<
String
,
Object
>
dingTalkHeaders
=
new
HashMap
<
String
,
Object
>();
public
Map
<
String
,
Object
>
getDingTalkHeaders
()
{
return
dingTalkHeaders
;
}
public
void
setDingTalkHeaders
(
Map
<
String
,
Object
>
dingTalkHeaders
)
{
this
.
dingTalkHeaders
=
dingTalkHeaders
;
}
private
volatile
static
NetworkUtils
network
;
// 构造函数 初始化tku、content-type
...
...
@@ -145,7 +134,7 @@ public class NetworkUtils {
Response
response
=
given
()
.
headers
(
dingTalkHeaders
)
.
body
(
jsonStr
)
.
post
(
DINGTALKPATH
);
.
post
(
dingTalkPath
);
if
(!
Objects
.
equals
(
response
.
statusCode
(),
200
)){
System
.
out
.
println
(
"请求状态码错误,code=【"
+
response
.
statusCode
()+
"】"
);
}
...
...
@@ -181,9 +170,5 @@ public class NetworkUtils {
}
public
static
void
main
(
String
[]
args
)
throws
IOException
{
}
}
src/test/liveTestNG.xml
View file @
f2a7b003
This diff is collapsed.
Click to expand it.
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