我有多个功能文件,每个功能文件至少包含 5 个场景(测试用例)。使用行为框架运行所有功能,给出以下命令
behave --junit
我收到以下异常
Exception UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 22: ordinal not in range(128)
Traceback (most recent call last):
File "myLoc/behave", line 9, in <module>
load_entry_point('behave==1.2.5', 'console_scripts', 'behave')()
File "project/lib/python2.7/dist-packages/behave/__main__.py", line 109, in main
failed = runner.run()
File "project/lib/python2.7/dist-packages/behave/runner.py", line 672, in run
return self.run_with_paths()
File "project/lib/python2.7/dist-packages/behave/runner.py", line 693, in run_with_paths
return self.run_model()
File "project/lib/python2.7/dist-packages/behave/runner.py", line 483, in run_model
failed = feature.run(self)
File "project/lib/python2.7/dist-packages/behave/model.py", line 523, in run
failed = scenario.run(runner)
File "project/lib/python2.7/dist-packages/behave/model.py", line 882, in run
if not step.run(runner):
File "project/lib/python2.7/dist-packages/behave/model.py", line 1499, in run
output = runner.log_capture.getvalue()
File "project/lib/python2.7/dist-packages/behave/log_capture.py", line 99, in getvalue
return '\n'.join(self.formatter.format(r) for r in self.buffer)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 22: ordinal not in range(128)
发生此异常时,行为不会运行下一个场景(测试)
任何人都可以帮助解决这个问题