Closed testlabauto closed 2 months ago
@acuanico-tr-galt
I am getting a similar error when I try to run the tests. I find that somehow strange. Shouldn't the tests run when a new version is built? How can this happen? Or what am I doing wrong when running the tests?
ERROR tests/test_api_data_provider.py - serde.compat.SerdeError: Method trcli.data_classes.dataclass_testrail.TestRailResult.__init__() parameter version="None" violates type hint <class 'str'>, as <class "builtins.NoneType"> "None" not instanc...
ERROR tests/test_junit_parser.py
ERROR tests/test_robot_parser.py
Getting a similar error to testlabauto that started today except it seems to be int related. We've confirmed that using the 1.9.5 version does not result in the error.
Parsing JUnit report.
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.5/x64/bin/trcli", line 8, in
I am getting a similar int parsing error with importing a junit file, and reverting to 1.9.5 resolves it.
I'm having similar error, File "<@beartype(trcli.data_classes.dataclass_testrail.create_fn.init) at 0x7f71b2d9a280>", line 35, in init serde.compat.SerdeError: Method trcli.data_classes.dataclass_testrail.create_fn.init() parameter case_id="None" violates type hint <class 'int'>, as <class "builtins.NoneType"> "None" not instance of int.
@marloncabracaGL seeing the exact error as well.... pinning the package back to 1.9.5 resolves it.
Also seeing this error. Pinning to 1.9.5 to resolve.
Thanks for raising this issue. We are now looking at it.
I have the very same error when using trcli version 1.9.6, however it appears only when I am trying to publish the results from the bitbucket pipeline. When I am trying to publish results from my computer it works fine (I have 1.9.6 installed too).
Forcing the pipeline to download version 1.9.5 solves the issue for now.
TestRail CLI v1.9.6
Copyright 2024 Gurock Software GmbH - www.gurock.com
Parser Results Execution Parameters
> Report file: test-results/junit-report.xml
> Config file: trcli-config.yml
> TestRail instance: {{host}} (user: {{user_mail_address}})
> Project: {{project_name}}
> Run title: Playwright Automated Test Run - qa - 2024-09-02
> Update run: No
> Add to milestone: No
> Auto-create entities: False
Parsing JUnit report.
Traceback (most recent call last):
File "/usr/local/bin/trcli", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/trcli/cli.py", line 242, in main
return super().main(windows_expand_args=False, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/trcli/commands/results_parser_helpers.py", line 101, in wrapper_common_options
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/trcli/commands/cmd_parse_junit.py", line 34, in cli
parsed_suites = JunitParser(environment).parse_file()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/trcli/readers/junit_xml.py", line 155, in parse_file
result = TestRailResult(
^^^^^^^^^^^^^^^
File "<@beartype(trcli.data_classes.dataclass_testrail.TestRailResult.__init__) at 0x7f6170327a60>", line 111, in __init__
serde.compat.SerdeError: Method trcli.data_classes.dataclass_testrail.TestRailResult.__init__() parameter elapsed=4.588 violates type hint <class 'str'>, as float 4.588 not instance of str.
Hi! We have published a fix for the issue above. This relates to the pyserde dependency strict type enforcement. Kindly check the latest release v1.9.7. We appreciate your support and understanding.
TestRail CLI Version
1.9.6
CLI Environment
Ubuntu latest
TestRail Version
8.0.4 Default (7036)
TestRail Instance Type
Professional Cloud
Current behavior
As soon as the new version was released, sending our results into testrail started failing:
Desired behavior
I would expect that the new version would not affect results publishing.
More Details
Content of XML