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
Wallen姚文辉
test_platform
Commits
7fa61ca1
Commit
7fa61ca1
authored
Jun 20, 2024
by
Wallen姚文辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
0f9cf91b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
28 deletions
+4
-28
serverCenter.py
manager/serverCenter.py
+4
-1
test.py
test.py
+0
-27
No files found.
manager/serverCenter.py
View file @
7fa61ca1
...
...
@@ -9,6 +9,7 @@ from jenkins import Jenkins
config
=
get_config
()
mysqlConf
=
config
[
"mysql"
]
Jenkinsconf
=
config
[
"jenkins"
]
class
server
():
app
=
Flask
(
__name__
,
template_folder
=
'auto_test/html'
,
static_folder
=
''
)
...
...
@@ -20,7 +21,9 @@ class server():
db
=
SQLAlchemy
(
app
)
socketio
=
SocketIO
()
socketio
.
init_app
(
app
,
cors_allowed_origins
=
'*'
)
auto_jenkins
=
Jenkins
(
'http://192.168.11.185:8080/'
,
"admin0001"
,
"123456"
)
auto_jenkins
=
Jenkins
(
Jenkinsconf
[
"address"
],
Jenkinsconf
[
"user"
],
Jenkinsconf
[
"password"
])
...
...
test.py
deleted
100644 → 0
View file @
0f9cf91b
import
requests
import
time
apifox_token
=
None
def
updateapitoken
():
user
,
password
=
'wallen.ywh@galaxyoversea.com'
,
'ywh940509'
global
apifox_token
apifox_token
=
requests
.
post
(
'https://api.apifox.com/api/v1/login?locale=zh-CN'
,
json
=
{
"account"
:
user
,
"loginType"
:
"EmailPassword"
,
"password"
:
password
})
.
json
()
.
get
(
"data"
)
.
get
(
"accessToken"
)
def
a
():
url
=
'https://app.apifox.com/project/2581365/api-test/test-report/5095032'
global
apifox_token
apifox_token
or
updateapitoken
()
infolist
=
url
.
replace
(
"https://app.apifox.com/project/"
,
""
)
.
split
(
'/'
)
project_id
,
caseid
=
infolist
[
0
],
infolist
[
-
1
]
result
=
requests
.
get
(
f
"https://api.apifox.com/api/v1/projects/{project_id}/api-test-reports/{caseid}?locale=zh-CN"
,
headers
=
{
"Authorization"
:
apifox_token
})
.
json
()
changeTime
=
lambda
x
:
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
time
.
localtime
(
float
(
x
)
/
1000
))
result
[
'data'
][
'timings'
][
"completed"
]
=
changeTime
(
result
[
'data'
][
'timings'
][
"completed"
])
result
[
'data'
][
'timings'
][
"started"
]
=
changeTime
(
result
[
'data'
][
'timings'
][
"started"
])
result
[
'url'
]
=
url
return
result
q
=
' jhoiqwhe '
q
=
q
.
strip
()
print
(
q
)
\ 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