Import yaml file fails when yaml file has reference to codedtest

I have created a recorded test (Test A). Additionally, to handle some complex scenario, I have created a codedtest (Test B). Within Test A, I have created a test step which calls Test B. I select Test A and save the test as a local file (.yaml). Now, I try to import the .yaml file to TestProject platform. Import fails with an error “Operation failed, Please try again.”.

Note: If I remove the test step (calling Test B), then yaml file import is successful.

Is this a known issue? I wanted to know how can we achieve importing Test A which has a test step calling Test B (coded test).

Hi @arun.subramanyam and welcome to our community :slight_smile: .

I have opened a ticket on this issue,

You will be notified here once it’s resolved.

This is the ticket number: TP-17217

Thank you @alex.ivanov !. In the meantime, can you please suggest if there is any workaround?

Hi @arun.subramanyam ,

Currently, we do not support importing yaml files with a coded test as a step inside the recorded step. That’s why you got this message a workaround that I can think of is to understand first what you have tried to achieve in the recorded test and then work on a solution that will give you the best possible way to achieve what you want.
I wanted to clarify a couple of points:

  1. Please share details on the complex scenario you had in the recorded test?

  2. Why did you download it as a yaml file?

  3. Did you try to edit somehow the yaml file and that’s why you wanted to upload it?

Hi @alex.ivanov ,
My responses to your questions…

  1. Please share details on the complex scenario you had in the recorded test?
    Answer: The coded test was created to validate some business logic of our application using loops, database connections which was not possible otherwise in recorded test. This coded test had to be used from the main recorded test to achieve end to end test flow of our application.

  2. Why did you download it as a yaml file?
    Answer: I had to download as a yaml file to share with another team who was having a different TestProject account. This is when I found out this issue.

  3. Did you try to edit somehow the yaml file and that’s why you wanted to upload it?
    Answer: No. I did not change any contents of yaml file. It was mainly to share as I mentioned above.

Hi @arun.subramanyam ,

I want to clarify something the test you executed with the coded test as a step included work for you? All you wanted to do is share this test with other team that has a different account?
The easiest way is to share your test from the dashboard.
You can achieve that by sharing the test with this option:
chrome_wGgOx2Wic1

As I said earlier the YAML file option is not possible.

Hi @alex.ivanov , Thanks for the suggestion. We tried this option as well (Share option). But, we are again getting an error “This test contains steps that are coded tests. Sharing coded tests is not allowed.”

Hi @arun.subramanyam ,

That’s correct, and there are only two options you can achieve that.

  1. Send the coded test as a jar file, and the user who receives it will upload it to the platform.

  2. The user needs to join your account, and then he can get the coded test.

Thanks @alex.ivanov very much for your patience and quick responses. This topic can be closed.

@arun.subramanyam Anytime, you are welcome :slight_smile: