Open vnadot opened 7 months ago
Another example of not user-friendly message: I run a suite and I don't know which file does not meet the version requirements.
$ ./${WETEST_PATH}/${WETEST_NAME} test/misc/WeTest/epicsComGen/rffi_WeTest_register_map_test_epicsComGen.yaml --no-gui -m P=SL-SCL-CM1:RF-RFFI-1: --propagate-macros
Traceback (most recent call last):
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/bin/..wetest-wrapped-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/command_line.py", line 426, in main
suite, configs = generate_tests(
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/command_line.py", line 171, in generate_tests
tests_data = ScenarioReader(
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/testing/reader.py", line 343, in __init__
self.deserialized = self._deserialize()
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/testing/reader.py", line 437, in _deserialize
new_sc = ScenarioReader(
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/testing/reader.py", line 350, in __init__
self.version_is_supported = ScenarioReader.supports_version(
File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/testing/reader.py", line 723, in supports_version
raise UnsupportedFileFormatError(file_version)
wetest.testing.reader.UnsupportedFileFormatError: Scenario version '1.2.0' not supported. Current WeTest version: '2.0.0'.
Look at the WeTest repository for the CHANGELOG:
https://github.com/epics-extensions/WeTest
I would like a message like this:
wetest.testing.reader.UnsupportedFileFormatError: Scenario version '1.2.0' (file toto.yaml) not supported.
WeTest errors are not very user-friendly. For example (they are many examples):
for this test:
I got this error message
The reason is because of a type error (see #84). Setting
set_value: 0
in my case fix the issue.I propose to add some hints after an error message. In this specific case it could be:
type mismatch: try to set a string in int type