Hello Team,
i try to import a junit reports file generated by pytest which test some API.
In my test i have a timeout error which is a failed case but i cannot import the test due to the following message
Importer error: Failed to execute step 2 (insert): Input data was rejected: Validation errors: An instance of Comment has failed the validation:
- property target has failed the following constraints: target must be one of the following values: TC, TRTC, target must be a string
(API_INVALID_INPUT_DATA)
This is my result.xml
<testsuites>
<testsuite name="pytest" errors="0" failures="2" skipped="0" tests="2" time="20.126" timestamp="2025-05-20T15:06:22.606914+00:00" hostname="runner-hfsxdc7ty-project-62-concurrent-0">
<testcase classname="QA.preprod.test_soft_preprod" name="test_users_preprod" time="15.026">
<failure message="AssertionError: Timeout lors de l'appel à https://superndd.com/users">E TimeoutError: timed out The above exception was the direct cause of the following exception: E urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7fa6450e8b10>, 'Connection to superndd.com timed out. (connect timeout=5)') The above exception was the direct cause of the following exception: E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='superndd.com', port=8080): Max retries exceeded with url: /users (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa6450e8b10>, 'Connection to superndd.com timed out. (connect timeout=5)')) During handling of the above exception, another exception occurred: E requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='superndd.com', port=8080): Max retries exceeded with url: /users (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa6450e8b10>, 'Connection to superndd.com timed out. (connect timeout=5)')) During handling of the above exception, another exception occurred: E AssertionError: Timeout lors de l'appel à https://superndd.com/users</failure>
</testcase>
<testcase classname="QA.preprod.test_soft_preprod" name="test_metrics_endpoint_preprod" time="5.011">
<failure message="AssertionError: Timeout lors de l'appel à https://superndd.com/metrics">E TimeoutError: timed out The above exception was the direct cause of the following exception: E urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7fa644f11ad0>, 'Connection to superndd.com timed out. (connect timeout=5)') The above exception was the direct cause of the following exception: E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='superndd.com', port=8080): Max retries exceeded with url: /metrics (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa644f11ad0>, 'Connection to superndd.com timed out. (connect timeout=5)')) During handling of the above exception, another exception occurred: E requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='superndd.com', port=8080): Max retries exceeded with url: /metrics (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa644f11ad0>, 'Connection to superndd.com timed out. (connect timeout=5)')) During handling of the above exception, another exception occurred: E AssertionError: Timeout lors de l'appel à https://superndd.com/metrics</failure>
</testcase>
</testsuite>
</testsuites>
I try to do pytest --tb=no to avoid traceback bt i still have some timeout traceback in the failure message. I think this is related to special and escaping characters but i don’t know what to do to import my test in this case.
Thank you