API_INVALID_INPUT_DATA cli error

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

Hi and welcome to the Testiny forum!

Can you please post the command line you use?
And please make sure you use the latest Testiny CLI (at the time of writing v1.24.0). You can see the version when you start the Testiny CLI.

Thank you!

Best regards,
Alex

Hello thanks for your reply.

I admit that i’m not on the last version i use 1.18.1 (but this is the first time i have the problem).

./testiny-importer-linux testrun --app “ndd” --project XXX --apikey XXX --junit results.xml --name “QA” --junit-classname-as-folder -y -q

I will update my version and retest but it’s odd that i encounter this kind of issue for the first time ?

OK @Alex_Hoisl , upgrading just works… Many thanks ^^‘’’