Forum Discussion

Manijem's avatar
Manijem
Occasional Contributor
5 years ago
Solved

Renamed endpoints

I use ready api and developed a composite project to test rest api. I have added multiple endpoints under Apis. Then I renamed the service(APIs navigator tree) as similar to the test suite that I used the endpoint.
https://support.smartbear.com/readyapi/docs/_images/apis/organize/rest-structure.png

Then I committed the code to git and when imported this project by someone , endpoints that named similar to the test suites are missing. Could I solve this problem?.
  • There are some APIs I did not rename as similar to the test suite name. These APIs and test cases remain as it is.
  • Hey Manijem,

    Before the commit/merge are you ensuring you are saving after the rename before you do the push? I know youd expect a save to occur as part of the push but id hit the save first just to be sure. I gotta admit, the fact that the renamed apis are disappearing makes me think youve found a defect, but we need to be sure.

    As an exercise to determine exactly the boundaries of your issue, id try the following tests.

    1. Rename apis, create tests against renamed APIs, HIT SAVE! then close down ReadyAPI! (without the commit/merge) and relaunch ReadyAPI! and check the state of the renamed apis.
    Are the APIs still present?
    Are the associated test cases still present?
    Do the commit/merge
    Pull the latest code back into ReadyAPI!.
    Check the state of the renamed APIs/associated tests....are they both still present?

    2. Create APIs, create tests, save, then commit/merge.
    Pull the merged version back
    Rename APIs, create a new test against renamed API, save, then commit/merge.
    Pull the latest version back.
    Check the state of the renamed APIs/associated tests....are they both still present?
    Are the tests that were created against the API (before it was renamed) still present?

    According to the detail youve provided, youre doing the renaming of the APIs via API Navigator rather than via the Projects tab. Can you follow my instructions above, but this time do the renaming of the APIs via the Projects tab rather than renaming via the API Navigator frame? (Dont forget to hit Save!).

    I'm ezpecially interested in the tests associated with the API and whether they are present after youve pulled from git. The tests are child objects of the APIs, so you cant delete the API without delete the tests also, so if it is a defect it sounds like bit of a whopper.

    Cheers,

    Rich

8 Replies

  • richie's avatar
    richie
    Community Hero
    Hey Manijem,

    Just to clarify a couple of points:

    Q1. You created some new requests and subsequently renamed the service objects before you hit save, then did a push and merged your updates into the existing git repo and after this you did a pull and the previously renamed services had the original naming (the same name as when the services were created)?

    Q2. You say the naming is incorrect in the API Navigator view. Are the names incorrect when viewing via the 'Projects' tab (top right of the window next to the 'SoapUI Pro' tab)?

    Cheers,

    Rich
    • Manijem's avatar
      Manijem
      Occasional Contributor
      Thank you very much for the answer. Actually, I am still new to this tool. I just added api endpoints to APIs and once they are populated under Apis, I renamed the source part. Once I completed the test cases , just pushed the code. I never saved anything by clicking on save. But some renamed endpoints are populated under Apis. As per my understanding,
      In the local workspace, I can't see the missing folders and it seems that merging with folder with same name of test suite folders.
      • Manijem's avatar
        Manijem
        Occasional Contributor
        If this explanation is not clear, please mention it. Then I can explain it again