mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-07 00:39:34 +08:00
change: support make testcases for multiple testcase path
This commit is contained in:
@@ -71,7 +71,7 @@ def format_with_black(tests_path: Text):
|
|||||||
logger.error(ex)
|
logger.error(ex)
|
||||||
|
|
||||||
|
|
||||||
def main_make(tests_path: Text) -> List:
|
def make(tests_path: Text) -> List:
|
||||||
testcases = []
|
testcases = []
|
||||||
if os.path.isdir(tests_path):
|
if os.path.isdir(tests_path):
|
||||||
files_list = load_folder_files(tests_path)
|
files_list = load_folder_files(tests_path)
|
||||||
@@ -92,6 +92,14 @@ def main_make(tests_path: Text) -> List:
|
|||||||
return testcase_path_list
|
return testcase_path_list
|
||||||
|
|
||||||
|
|
||||||
|
def main_make(tests_paths: List[Text]) -> List:
|
||||||
|
testcase_path_list = []
|
||||||
|
for tests_path in tests_paths:
|
||||||
|
testcase_path_list.extend(make(tests_path))
|
||||||
|
|
||||||
|
return testcase_path_list
|
||||||
|
|
||||||
|
|
||||||
def init_make_parser(subparsers):
|
def init_make_parser(subparsers):
|
||||||
""" make testcases: parse command line options and run commands.
|
""" make testcases: parse command line options and run commands.
|
||||||
"""
|
"""
|
||||||
@@ -99,7 +107,7 @@ def init_make_parser(subparsers):
|
|||||||
"make", help="Convert YAML/JSON testcases to Python unittests.",
|
"make", help="Convert YAML/JSON testcases to Python unittests.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"testcase_path", nargs="?", help="Specify YAML/JSON testcase path"
|
"testcase_path", nargs="*", help="Specify YAML/JSON testcase file/folder path"
|
||||||
)
|
)
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|||||||
Reference in New Issue
Block a user