Commit 475ed1b1 authored by Wallen姚文辉's avatar Wallen姚文辉

添加bug严重程度字段

parent 55efaba5
......@@ -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
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment