From d8c5aa1a60d826d863754516833bc9151b7efd9c Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sat, 24 Feb 2018 13:47:22 +0800 Subject: [PATCH] print error info when missing debugging type --- main-debug.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main-debug.py b/main-debug.py index b7aae0f0..0b955c7f 100644 --- a/main-debug.py +++ b/main-debug.py @@ -1,6 +1,7 @@ import sys from httprunner.cli import main_hrun, main_locust +from httprunner.logger import color_print cmd = sys.argv.pop(1) @@ -8,3 +9,11 @@ if cmd in ["hrun", "httprunner", "ate"]: main_hrun() elif cmd in ["locust", "locusts"]: main_locust() +else: + color_print("Miss debugging type.", "RED") + example = "\n".join([ + "e.g.", + "python main-debug.py hrun /path/to/testset_file", + "python main-debug.py locusts -f /path/to/testset_file" + ]) + color_print(example, "yellow")