Skip to content
Open

Test #36

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xmind2testcase/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
__url__ = 'https://github.com/zhuifengshen/xmind2testcase'
__author__ = 'Devin'
__author_email__ = '1324556701@qq.com'
__version__ = '1.5.0'
__version__ = '1.5.1'
__license__ = 'MIT'
__cake__ = u'\u2728 \U0001f370 \u2728'
7 changes: 5 additions & 2 deletions xmind2testcase/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,15 @@ def get_execution_type(topics):
labels = filter_empty_or_ignore_element(labels)
exe_type = 1
for item in labels[::-1]:
if item.lower() in ['自动', 'auto', 'automate', 'automation']:
if item.lower() in ['冒烟测试']:
exe_type = 2
break
if item.lower() in ['手动', '手工', 'manual']:
if item.lower() in ['功能测试']:
exe_type = 1
break
if item.lower() in ['接口测试']:
exe_type = 3
break
return exe_type


Expand Down
8 changes: 4 additions & 4 deletions xmind2testcase/zentao.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ def gen_case_step_and_expected_result(steps):


def gen_case_priority(priority):
mapping = {1: '', 2: '', 3: ''}
mapping = {1: '1', 2: '2', 3: '3'}
if priority in mapping.keys():
return mapping[priority]
else:
return ''
return '2'


def gen_case_type(case_type):
mapping = {1: '手动', 2: '自动'}
mapping = {1: '功能测试', 2: '冒烟测试', 3: '接口测试'}
if case_type in mapping.keys():
return mapping[case_type]
else:
return '手动'
return '功能测试'


if __name__ == '__main__':
Expand Down