Test results disappear on the Test run

Hi

I am creating a Test run using an API as shown below

and for the same Test run I am adding the results using the below API to upload the Test results

and it shows like this on the Testiny

once I navigate to another test run and come back, it is blank

If I try to add test case manually for the same Test run , it throws error

{type: "ApiError", code: "API_INPUT_DATA_CONFLICT", message: "Mapping already exists",reqid:"4b3gygOmBZJttIGUTRfe",type: "ApiError"}

KInldly help me if I am missing anything

Hi!

In your code you create a test run and specify closed_at and closed_by. Although you set is_deleted and is_closed to False, this has some side effects in the UI and we’re discussing how to resolve this issue. For now, please try omitting these parameters.

You can also omit created/modified/deleted_at/by as these values are ignored when inserting an entity.

May I also ask what’s your use case for importing test runs and their results via API?
We support importing automated test results via our CLI tool and we’re also currently working on improving the CLI importer and supporting more formats. What would you need to use the CLI?

Thanks for your feedback and best regards,
Hanna

Hi,

That worked !! I have removed created/modified/deleted_at/by fields and tried.

But CLI is for uploading the test results from an XML file right?
Is there a way of doing it from Python API? uploading XML files?

For now, the CLI supports uploading test results via CSV files, JUnit XML files and Playwright JSON file. Would you need support for another file format?

Of course you can achieve the same with using Testiny’s REST API directly in Python, as the CLI tool also uses the API. I don’t know your exact use case but if you want to import automated test results, using the CLI would work out-of-the-box.

Can you guide me on how to do it from the Python API? I have an issue with using CLI in my system due to the SSL certificates as mentioned here (https://www.testiny.io/forum/t/importer-error/198/2)

How can I upload an XML file using the Python API?

I just posted a thing you can try to fix your certificate problem in this thread:
https://nodejs.org/docs/latest-v4.x/api/cli.html#cli_node_extra_ca_certs_file

We cannot give you exact code for Python, that’s unfortunately beyond our level of support. There is unfortunately no way to upload an XML file using the API, that’s what the CLI is intended for.

Again, I can just stress that using the CLI will do everything for you, so let’s try to make the CLI work for you.

Regards,
Alex