diff --git a/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py b/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py index 91682f56..97593703 100644 --- a/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py +++ b/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_functions_test.py @@ -20,7 +20,6 @@ class TestCaseRequestWithFunctions(HttpRunner): .base_url("https://postman-echo.com") .verify(False) .export(*["foo3"]) - .locust_weight(2) ) teststeps = [ diff --git a/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py b/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py index ab052c17..54d76e41 100644 --- a/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py +++ b/examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py @@ -29,7 +29,6 @@ class TestCaseRequestWithTestcaseReference(HttpRunner): ) .base_url("https://postman-echo.com") .verify(False) - .locust_weight(3) ) teststeps = [ diff --git a/examples/postman_echo/request_methods/request_with_functions_test.py b/examples/postman_echo/request_methods/request_with_functions_test.py index 3c23b94c..90f14f36 100644 --- a/examples/postman_echo/request_methods/request_with_functions_test.py +++ b/examples/postman_echo/request_methods/request_with_functions_test.py @@ -20,7 +20,6 @@ class TestCaseRequestWithFunctions(HttpRunner): .base_url("https://postman-echo.com") .verify(False) .export(*["foo3"]) - .locust_weight(2) ) teststeps = [ diff --git a/httprunner/cli.py b/httprunner/cli.py index 38676857..1aa29eac 100644 --- a/httprunner/cli.py +++ b/httprunner/cli.py @@ -93,7 +93,7 @@ def main(): sys.exit(0) extra_args = [] - if len(sys.argv) >= 2 and sys.argv[1] in ["run", "locusts"]: + if len(sys.argv) >= 2 and sys.argv[1] in ["run"]: args, extra_args = parser.parse_known_args() else: args = parser.parse_args() diff --git a/httprunner/config.py b/httprunner/config.py index fb5a4b31..0f372975 100644 --- a/httprunner/config.py +++ b/httprunner/config.py @@ -47,10 +47,6 @@ class Config(object): def path(self) -> Text: return self.__config.path - @property - def weight(self) -> int: - return self.__config.weight - def variables(self, **variables) -> "Config": self.__config.variables.update(variables) return self @@ -68,10 +64,6 @@ class Config(object): self.__config.export = list(set(self.__config.export)) return self - def locust_weight(self, weight: int) -> "Config": - self.__config.weight = weight - return self - def struct(self) -> TConfig: return self.__config diff --git a/httprunner/make.py b/httprunner/make.py index 1ce384a5..8722b965 100644 --- a/httprunner/make.py +++ b/httprunner/make.py @@ -198,9 +198,6 @@ def make_config_chain_style(config: Dict) -> Text: if "export" in config: config_chain_style += f'.export(*{config["export"]})' - if "weight" in config: - config_chain_style += f'.locust_weight({config["weight"]})' - return config_chain_style @@ -484,10 +481,6 @@ def make_testsuite(testsuite: Dict): ) testcase_dict["config"]["variables"].update(testcase_variables) - # override weight - if "weight" in testcase: - testcase_dict["config"]["weight"] = testcase["weight"] - # make testcase testcase_pytest_path = make_testcase(testcase_dict, testsuite_dir) pytest_files_run_set.add(testcase_pytest_path) diff --git a/httprunner/models.py b/httprunner/models.py index dcb2849b..578fe30b 100644 --- a/httprunner/models.py +++ b/httprunner/models.py @@ -49,7 +49,7 @@ class TConfig(BaseModel): # teardown_hooks: Hooks = [] export: Export = [] path: Text = None - weight: int = 1 + # configs for other protocols thrift: TConfigThrift = None