You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is.
Versions
Please complete the following information:
OS: macos
Python 2.7
HttpRunner 1.5.15
Traceback
Traceback (most recent call last):
File "/usr/local/bin/hrun", line 11, in
sys.exit(main_hrun())
File "/usr/local/lib/python2.7/site-packages/httprunner/cli.py", line 86, in main_hrun
dot_env_path=args.dot_env_path
File "/usr/local/lib/python2.7/site-packages/httprunner/api.py", line 232, in run
testcases = loader.load_tests(path_or_testcases, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 959, in load_tests
testcases = load_tests(file_path, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 976, in load_tests
testcases_list = load_tests(files_list, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 959, in load_tests
testcases = load_tests(file_path, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 982, in load_tests
testcase = _load_testcase(raw_testcase, project_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 425, in _load_testcase
loaded_testcase["teststeps"].extend(_load_teststeps(test_block, project_mapping))
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 355, in _load_teststeps
extend_api_definition(test_block)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 348, in extend_api_definition
def_block = _get_block_by_name(ref_call, "def-api", project_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 472, in _get_block_by_name
block = parser.substitute_variables(block, args_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 240, in substitute_variables
eval_value = substitute_variables(value, variables_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 240, in substitute_variables
eval_value = substitute_variables(value, variables_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 233, in substitute_variables
for item in content
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 255, in substitute_variables
content = content.replace(var, value)
AttributeError: 'int' object has no attribute 'replace'
Project structure
File structure of your project. A good way is to run tree -a command.
Project files (If possible)
Provide your project files to help locate and debug bugs faster. This is not mandatory.
NOTICE: Before uploading your project files, don't forget to remove sensitive data, e.g. IP, username and password, key info etc.
The text was updated successfully, but these errors were encountered:
@debugtalk Sorry for the wrong test case. The proper case to produce this issue has been added. Since this function hasn't changed after my first PR, so this issue exists on 2.0 too.
Describe the bug
A clear and concise description of what the bug is.
Versions
Please complete the following information:
Traceback
Traceback (most recent call last):
File "/usr/local/bin/hrun", line 11, in
sys.exit(main_hrun())
File "/usr/local/lib/python2.7/site-packages/httprunner/cli.py", line 86, in main_hrun
dot_env_path=args.dot_env_path
File "/usr/local/lib/python2.7/site-packages/httprunner/api.py", line 232, in run
testcases = loader.load_tests(path_or_testcases, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 959, in load_tests
testcases = load_tests(file_path, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 976, in load_tests
testcases_list = load_tests(files_list, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 959, in load_tests
testcases = load_tests(file_path, dot_env_path)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 982, in load_tests
testcase = _load_testcase(raw_testcase, project_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 425, in _load_testcase
loaded_testcase["teststeps"].extend(_load_teststeps(test_block, project_mapping))
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 355, in _load_teststeps
extend_api_definition(test_block)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 348, in extend_api_definition
def_block = _get_block_by_name(ref_call, "def-api", project_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/loader.py", line 472, in _get_block_by_name
block = parser.substitute_variables(block, args_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 240, in substitute_variables
eval_value = substitute_variables(value, variables_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 240, in substitute_variables
eval_value = substitute_variables(value, variables_mapping)
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 233, in substitute_variables
for item in content
File "/usr/local/lib/python2.7/site-packages/httprunner/parser.py", line 255, in substitute_variables
content = content.replace(var, value)
AttributeError: 'int' object has no attribute 'replace'
Project structure
File structure of your project. A good way is to run
tree -a
command.Project files (If possible)
Provide your project files to help locate and debug bugs faster. This is not mandatory.
NOTICE: Before uploading your project files, don't forget to remove sensitive data, e.g. IP, username and password, key info etc.
The text was updated successfully, but these errors were encountered: