20 lines
491 B
Python
20 lines
491 B
Python
# -*- coding: utf-8 -*-
|
|
# @Time : 2024/1/13 9:33
|
|
# @Author : floraachy
|
|
# @File : data_tools
|
|
# @Software: PyCharm
|
|
# @Desc:
|
|
|
|
# 标准库导入
|
|
import random
|
|
|
|
|
|
def zip_test_step(step_id, step_status_id=None):
|
|
"""
|
|
处理测试用例的步骤
|
|
"""
|
|
if step_status_id:
|
|
return [{'id': id, 'stepStatus': execResult} for id, execResult in zip(step_id, step_status_id)]
|
|
else:
|
|
return [{'id': id, 'stepStatus': random.choice([0, 1, 2, 3, 4])} for id in step_id]
|