Postman Challenge: Day 2 - Version Control

As you know, we are in the journey to complete our 15 Days of Postman Challenge for testers. If you have missed the introduction about challenge and activity for the day 1, you can visit this link. Now let's jump into the task for Day 2 - Version Control.

Getting Started

We will fork the collection for the Day 02: Version Control and fork into our workspace. We will also give our fork some name, you can also go with the default name as well. I have named it Bhavik's fork. As per the challenge name suggest, it's about version contol so we will have some tasks about branching and merging.

  • Forking: As per the instruction, we have to fork the collection (Bhavik's fork) again and create another fork with the name feature-branch. So let's do it, and now we will have two different forks for the Day 02: Version Control collection.
  • Now we need to add an API request in the first folder named Version Control inside the feature-branch fork. 🔱
  • Request URL: In the new request, we will set the request URL to {{baseURL}}/post. Note that {{baseURL}} is being used as a variable, for which we need to set value to the environment. We will take a look at the environment little later.
  • Request Type: We will also change the request type from default GET to POST as we need to send specific data to the server. In this case, it will be noodles. 🍜
  • Request Body: We will paste the request body provided in the requirements and make sure it's mentioned as Raw and in JSON.
  • Environment: In our Day 1 challange, we have created an environment in Postman, so let's just rename it to myEnvironment and use it again here as per the requirements.
  • Environment Variable: We will create a new variable {{baseURL}} in the environment and assign the value as https://postman-echo.com.
  • Status Code: Now we will test our request by hitting the send request, and validate that we are getting response along with status code 200.
  • Merge Changes: As we have successfully validated our test, now we need to merge our feature-branch in the parent branch which is Bhavik's fork in this case. So we will click on three dots ... in front of the collection name and click merge changes. Here we need to confirm the source and destination fork's name to ensure we are merging against the right branches(forks).

New Request

Submit the Solution

As we have completed our test, now it's time to submit the solution. We will have to submit 3 different solutions.
As we worked on two different forks, means two different collections, we need to submit both collections and the environment we use for variables.

  • First Collection (Bhavik's fork): Click on the collection name and then click on the i button on right sidebar to get the first collection id.
  • Second Collection (feature-branch): Follow the same steps as above to get the second collection id.
  • Environment (myEnvironment): Click on the environment you have created and click on the i button on right sidebar to get the environment id.
  • To complete the challenge, we can directly copy paste the collection id and environment id in the request URLs of the solution requests or we can also store those as collection variables (refer to day 1 challenge to learn about how to use collection variables).

Finishing up

Yay! One more task completed successfully. You can follow my Postman Challenge in the Postman public workspace QA Club API. Please share your experience if you are also taking this challenge or having any questions related to today's tasks.

Happy Testing! 😊🚀😊