modified: README.md

modified:   xmind2case.py
This commit is contained in:
sheerfish999
2018-05-28 13:06:23 +08:00
parent f9556f70f0
commit 4f396dd4fc
15 changed files with 99 additions and 8 deletions

View File

@@ -75,6 +75,7 @@ if a=="N":
### 生成的遍历路径
生成的 case 目录下各个 casen_path.py
case 目录下 case.csv
## 基本绘图要求

Binary file not shown.

Binary file not shown.

5
case/case.csv Normal file
View File

@@ -0,0 +1,5 @@
1,Receive_Data(),Verify_Data(),a=test(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> a="Y",b=Transform(a),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> b>1,Load()
2,Receive_Data(),Verify_Data(),a=test(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> a="Y",b=Transform(a),c=select1(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> c=5,e=select2(c),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> e>=5,d=select4(c),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> d<=8,runit()
3,Receive_Data(),Verify_Data(),a=test(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> a="Y",b=Transform(a),c=select1(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> c=2,d=select3(c),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> d>8,runit()
4,Receive_Data(),Verify_Data(),a=test(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> a="Y",b=Transform(a),c=select1(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> c=2,d=select3(c),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> d<=8,runit()
5,Receive_Data(),Verify_Data(),a=test(),<EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C7B0> a="N",Report_Errors()
Can't render this file because it contains an unexpected character in line 1 and column 57.

5
case/case0_path.py Normal file
View File

@@ -0,0 +1,5 @@
Receive_Data()
Verify_Data()
a=test()
b=Transform(a)
Load()

8
case/case1_path.py Normal file
View File

@@ -0,0 +1,8 @@
Receive_Data()
Verify_Data()
a=test()
b=Transform(a)
c=select1()
e=select2(c)
d=select4(c)
runit()

7
case/case2_path.py Normal file
View File

@@ -0,0 +1,7 @@
Receive_Data()
Verify_Data()
a=test()
b=Transform(a)
c=select1()
d=select3(c)
runit()

7
case/case3_path.py Normal file
View File

@@ -0,0 +1,7 @@
Receive_Data()
Verify_Data()
a=test()
b=Transform(a)
c=select1()
d=select3(c)
runit()

4
case/case4_path.py Normal file
View File

@@ -0,0 +1,4 @@
Receive_Data()
Verify_Data()
a=test()
Report_Errors()

35
case/case_code.py Normal file
View File

@@ -0,0 +1,35 @@
Receive_Data()
Verify_Data()
a=test()
if a=="Y":
b=Transform(a)
if b>1:
Load()
c=select1()
if c==5:
e=select2(c)
if e>=5:
d=select4(c)
if d<=8:
runit()
if c==2:
d=select3(c)
if d>8:
runit()
if d<=8:
runit()
if a=="N":
Report_Errors()

1
content.xml Normal file

File diff suppressed because one or more lines are too long

1
fina.xml Normal file
View File

@@ -0,0 +1 @@
<node_1b8245dra75mmi6ap7t53sn9vg id="1b8245dra75mmi6ap7t53sn9vg" type="start">Start<node_3ikogfi858brsn8ansq5q2ds0l id="3ikogfi858brsn8ansq5q2ds0l" type="sub">Receive_Data<node_05ot85cp1k053ohrrhtgo2l2p1 id="05ot85cp1k053ohrrhtgo2l2p1" type="sub">Verify_Data<node_76q1ecqiei4u494hnsu4a9cl0i id="76q1ecqiei4u494hnsu4a9cl0i" type="func">a=test()<node_6690se63nn0agpf9u043icvmc4 id="6690se63nn0agpf9u043icvmc4" type="select">a="Y"<node_4b2jmltt0skuhgqbdfu5l8c02j id="4b2jmltt0skuhgqbdfu5l8c02j" type="func">b=Transform(a)<node_2293p47fvb7tf9uj4irn3m4hdp id="2293p47fvb7tf9uj4irn3m4hdp" type="select">b&gt;1<node_1pq6cvcq69ka37htidt28aaq2c id="1pq6cvcq69ka37htidt28aaq2c" type="sub">Load<node_6g2eenlf2rt8ggrht7702r9380 id="6g2eenlf2rt8ggrht7702r9380" type="end">Stop</node_6g2eenlf2rt8ggrht7702r9380></node_1pq6cvcq69ka37htidt28aaq2c></node_2293p47fvb7tf9uj4irn3m4hdp><node_0svgpd5rufc11mfjeh2gq1inl3 id="0svgpd5rufc11mfjeh2gq1inl3" type="func">c=select1()<node_2nlj5tfs12vekrvk54nt5buhoe id="2nlj5tfs12vekrvk54nt5buhoe" type="select">c=5<node_4s9c796qaih2cs6n50ofpc8tq5 id="4s9c796qaih2cs6n50ofpc8tq5" type="func">e=select2(c)<node_4lku2ua912cmitnuve2i9gcmqt id="4lku2ua912cmitnuve2i9gcmqt" type="select">e&gt;=5<node_0mcqrff5v3rrda7uu9upr09eov id="0mcqrff5v3rrda7uu9upr09eov" type="func">d=select4(c)<node_4a1sc7pkm2c0nip2nes7g5fpkr id="4a1sc7pkm2c0nip2nes7g5fpkr" type="select">d&lt;=8<node_1qa2ud181hefi0eq7e4u7p2e63 id="1qa2ud181hefi0eq7e4u7p2e63" type="sub">runit<node_6g2eenlf2rt8ggrht7702r9380 id="6g2eenlf2rt8ggrht7702r9380" type="end">Stop</node_6g2eenlf2rt8ggrht7702r9380></node_1qa2ud181hefi0eq7e4u7p2e63></node_4a1sc7pkm2c0nip2nes7g5fpkr></node_0mcqrff5v3rrda7uu9upr09eov></node_4lku2ua912cmitnuve2i9gcmqt></node_4s9c796qaih2cs6n50ofpc8tq5></node_2nlj5tfs12vekrvk54nt5buhoe><node_6j5199lve49iqd75gq2f1ivrcn id="6j5199lve49iqd75gq2f1ivrcn" type="select">c=2<node_590a3e8ripd189qdq43e2nallk id="590a3e8ripd189qdq43e2nallk" type="func">d=select3(c)<node_24kul0roj2ectgebf0shqm4b2n id="24kul0roj2ectgebf0shqm4b2n" type="select">d&gt;8<node_1qa2ud181hefi0eq7e4u7p2e63 id="1qa2ud181hefi0eq7e4u7p2e63" type="sub">runit<node_6g2eenlf2rt8ggrht7702r9380 id="6g2eenlf2rt8ggrht7702r9380" type="end">Stop</node_6g2eenlf2rt8ggrht7702r9380></node_1qa2ud181hefi0eq7e4u7p2e63></node_24kul0roj2ectgebf0shqm4b2n><node_4a1sc7pkm2c0nip2nes7g5fpkr id="4a1sc7pkm2c0nip2nes7g5fpkr" type="select">d&lt;=8<node_1qa2ud181hefi0eq7e4u7p2e63 id="1qa2ud181hefi0eq7e4u7p2e63" type="sub">runit<node_6g2eenlf2rt8ggrht7702r9380 id="6g2eenlf2rt8ggrht7702r9380" type="end">Stop</node_6g2eenlf2rt8ggrht7702r9380></node_1qa2ud181hefi0eq7e4u7p2e63></node_4a1sc7pkm2c0nip2nes7g5fpkr></node_590a3e8ripd189qdq43e2nallk></node_6j5199lve49iqd75gq2f1ivrcn></node_0svgpd5rufc11mfjeh2gq1inl3></node_4b2jmltt0skuhgqbdfu5l8c02j></node_6690se63nn0agpf9u043icvmc4><node_1je2u1g9ghg60eu0g41668akej id="1je2u1g9ghg60eu0g41668akej" type="select">a="N"<node_6k78uamaup9hbadm03ug0665en id="6k78uamaup9hbadm03ug0665en" type="sub">Report_Errors<node_6g2eenlf2rt8ggrht7702r9380 id="6g2eenlf2rt8ggrht7702r9380" type="end">Stop</node_6g2eenlf2rt8ggrht7702r9380></node_6k78uamaup9hbadm03ug0665en></node_1je2u1g9ghg60eu0g41668akej></node_76q1ecqiei4u494hnsu4a9cl0i></node_05ot85cp1k053ohrrhtgo2l2p1></node_3ikogfi858brsn8ansq5q2ds0l></node_1b8245dra75mmi6ap7t53sn9vg>

1
null.xml Normal file
View File

@@ -0,0 +1 @@
<node_1b8245dra75mmi6ap7t53sn9vg></node_1b8245dra75mmi6ap7t53sn9vg>

1
styles.xml Normal file

File diff suppressed because one or more lines are too long

View File

@@ -255,7 +255,7 @@ def pathlist2_scipts(pathlist):
casetitle="case"
##### 生成 按照路径拆分逻辑脚本 ------ 这段暂时意义不大
##### 生成 按照路径拆分逻辑脚本 ----- 一般用不到
"""
@@ -305,18 +305,20 @@ def pathlist2_scipts(pathlist):
f.writelines(script)
f.close()
"""
###### 生成 完全遍历的各个脚本 及手工测试用例, 前者可用于自动化遍历,后者可用于手工遍历
###### 生成 完全遍历的脚本
csv=""
for i in range(len(pathlist)):
filepath=casepath+"/" + casetitle + str(i) + "_path.py"
script=""
csv=csv + str(i+1)
for ii in range(len(pathlist[i])):
cmd_name=pathlist[i][ii][0]
@@ -327,6 +329,7 @@ def pathlist2_scipts(pathlist):
if cmd_name[-1:]!=")":
cmd_name=cmd_name+"()"
script=script +cmd_name + "\n"
csv=csv + "," + cmd_name
## 函数
@@ -334,19 +337,31 @@ def pathlist2_scipts(pathlist):
if cmd_name[-1:]!=")":
cmd_name=cmd_name+"()"
script=script + cmd_name + "\n"
csv=csv + "," + cmd_name
## 判断
if cmd_type=="select":
csv=csv + "," + "如果/前置 " + cmd_name
pass
## 路径脚本
f=open(filepath,"w")
f.writelines(script)
f.close()
f.close()
csv=csv + "\n"
## CSV 手工用例
csvpath=casepath+"/" + casetitle + ".csv"
f=open(csvpath,"w")
f.writelines(csv)
f.close()
##### 全逻辑脚本, 利用 xml 文件结构和特征
##### 全逻辑脚本, 利用 xml 文件结构和特征 可用于可视化编程
def xml2_script():