Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httprunner 2.5.7 版本 httprunner/loader/check.py--is_test_content函数有个小bug #1075

Open
newgrand-test opened this issue Mar 26, 2021 · 0 comments
Assignees
Labels
pending pending for confirmation

Comments

@newgrand-test
Copy link

newgrand-test commented Mar 26, 2021

问题描述

httprunner 2.5.7 版本 httprunner/loader/check.py--is_test_content函数有个小bug,testcase文件格式校验时,应该是v1,v2两个版本做校验。

版本信息

请提供如下版本信息:

  • 操作系统类型: [e.g. macos, Linux, Windows]
  • Python 版本 [e.g. 3.7]
  • HttpRunner 版本 [e.g. 2.5.7]

获取方式:

在 Python 交互式 shell 中输入如下命令进行获取:

项目文件内容(非必须)

elif "testcases" in data_structure:
    # maybe a testsuite, containing a group of testcases
    testcases = data_structure["testcases"]
    if not isinstance(testcases, list):
        return False

    for item in testcases:
        is_testcase = False
        try:
            JsonSchemaChecker.validate_testcase_v2_format(item)
            is_testcase = True
        except exceptions.FileFormatError:
            pass

        try:
            JsonSchemaChecker.validate_testcase_v2_format(item)
            is_testcase = True
        except exceptions.FileFormatError:
            pass

        if not is_testcase:
            return False

    return True
@newgrand-test newgrand-test added the pending pending for confirmation label Mar 26, 2021
@newgrand-test newgrand-test changed the title httprunner 2.5.7 版本 httprunner/loader/chech.py--is_test_content函数有个小bug httprunner 2.5.7 版本 httprunner/loader/check.py--is_test_content函数有个小bug Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending pending for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants