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
475ed1b1
Commit
475ed1b1
authored
May 16, 2024
by
Wallen姚文辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加bug严重程度字段
parent
55efaba5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
Tool.py
controller/Tool.py
+7
-1
Tool.cpython-310.pyc
controller/__pycache__/Tool.cpython-310.pyc
+0
-0
test.py
test.py
+6
-11
No files found.
controller/Tool.py
View file @
475ed1b1
...
...
@@ -131,7 +131,13 @@ def reportinfo():
if
each
[
"label"
]
==
"测试用例"
:
soup
=
BeautifulSoup
(
each
[
"html"
],
"html.parser"
)
i
[
"case"
]
=
[
i
.
next_element
for
i
in
soup
.
select
(
'tr>td[align="left"]>span>a'
)]
for
i
in
bug
:
info
=
requests
.
request
(
"get"
,
jiraAddress
+
"/rest/api/latest/issue/"
+
i
.
get
(
"key"
),
headers
=
headers
)
.
json
()
m
=
requests
.
request
(
"get"
,
jiraAddress
+
"/secure/AjaxIssueEditAction!default.jspa?decorator=none&issueId="
+
str
(
i
.
get
(
"id"
)),
headers
=
headers
)
.
json
()
for
j
in
m
.
get
(
"fields"
):
if
j
.
get
(
"label"
)
==
"严重程度"
:
i
[
"Severity"
]
=
info
[
"fields"
][
j
.
get
(
"id"
)]
.
get
(
"value"
)
break
res
=
{
"project"
:
result
[
"projects"
][
0
][
"name"
],
"sprint"
:
sprint
,
"people"
:
peoples
,
"story"
:
story
,
"bug"
:
bug
,
"testcase"
:
testcase
,
"statusMap"
:
status
,
"priorityMap"
:
priority
,
"typeMap"
:
type_
}
return
jsonify
({
"code"
:
200
,
"message"
:
"请求成功"
,
"data"
:
res
}),
200
...
...
controller/__pycache__/Tool.cpython-310.pyc
View file @
475ed1b1
No preview for this file type
test.py
View file @
475ed1b1
import
base64
import
requests
import
pandas
as
pd
import
xmindparser
from
copy
import
deepcopy
...
...
@@ -10,11 +9,6 @@ xmindparser.config = {
'hideEmptyValue'
:
True
# 是否隐藏空值
}
def
relational_case
(
project
):
jiraAddress
,
user
,
password
=
"http://jira.galaxy-immi.com"
,
"wallen.ywh"
,
"ywh940509"
headers
=
{
...
...
@@ -49,14 +43,14 @@ def makecase(filePath):
for
each
in
info
:
oldinfo
=
deepcopy
(
new
)
newtype
=
type
if
not
((
each
[
"title"
])
==
"Map"
or
(
each
[
"title"
])
==
"测试用例"
):
if
not
((
each
[
"title"
])
==
"Map"
or
(
each
[
"title"
])
==
"测试用例"
or
(
each
[
"title"
])
==
"sheet"
):
if
type
==
"name"
:
string
=
each
.
get
(
"title"
)
if
"tc:"
in
each
.
get
(
"title"
)
or
"tc:"
in
each
.
get
(
"title"
)
or
"tc:"
in
each
.
get
(
"title"
):
string
=
each
.
get
(
"title"
)
.
replace
(
"tc:"
,
""
)
.
replace
(
"tc:"
,
""
)
.
replace
(
"tc:"
,
""
)
newtype
=
"step"
if
oldinfo
.
get
(
"name"
):
oldinfo
[
"name"
]
=
oldinfo
.
get
(
"name"
)
+
"->"
+
string
oldinfo
[
"name"
]
=
oldinfo
.
get
(
"name"
)
and
oldinfo
.
get
(
"name"
)
+
"->"
+
string
or
string
else
:
oldinfo
[
"name"
]
=
string
elif
type
==
"step"
:
...
...
@@ -70,8 +64,6 @@ def makecase(filePath):
else
:
case_list
.
append
(
oldinfo
)
a
(
content
,{},
"name"
)
# for each in case_list:
# print(each)
name
=
list
(
map
(
lambda
x
:
x
.
get
(
"name"
),
case_list
))
step
=
list
(
map
(
lambda
x
:
x
.
get
(
"step"
),
case_list
))
expect
=
list
(
map
(
lambda
x
:
x
.
get
(
"expect"
),
case_list
))
...
...
@@ -79,8 +71,11 @@ def makecase(filePath):
dataframe
.
to_csv
(
"test.csv"
,
index
=
False
,
sep
=
','
)
# makecase("/home/yaowenhui/galaxTestCenter/1.07.xmind")
relational_case
(
"STARCOM"
)
#
relational_case("STARCOM")
a
=
1
b
=
a
and
12
or
13
print
(
b
)
\ 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