Ask a Question

Deleting API also delete the test case , is there a work around to fix it.

SOLVED
Hellotest
Contributor

Deleting API also delete the test case , is there a work around to fix it.

Hello,

In Ready API , wanted to fix the structure as how we added the API's. The issue facing is even though I cloned the original  API and moved to good structure, while deleting the old API , the test cases are also getting deleted.

Is there a way to fix this.

2 REPLIES 2
richie
Community Hero

Hey @Hellotest 

 

There is a reason why this is happening. 

 

Test steps can be considered t o be children of the parent API,  so if you delete the parent record, this would result in orphaned children records (which is not desirable), which is why this is happening.

 

what version of readyapi are you using?  I skipped a coupl of versio ns so I dont knnow when this functionality was added, but im running v3.9.2 and if you are in the test steps edit form -top right hand corner of the form is an 'API' button immediately above the 'Add Assertion' button,

 

if you click on this 'API' button it launches a form entitled 'Link REST Request'.  It appears that this functionality allows you to repoint your test steps to a different API.   This sounds like this is what you need.

 

so going forward if I wanted to repoint test steps to different apis I would:

 

1. clone the existing api/service/method/request the test step is associated with

2. repoint the teststep to the clone  api/service/method/request

3. once repointed, delete the original api/service/method/request

 

I think your test steeps will then be successfully repointed and preserved 

 

cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

Thank you very much Ruchie. I will try and check .

cancel
Showing results for 
Search instead for 
Did you mean: