Wintertainment 2020 - Day 2: Building a Reliable C...
Wintertainment 2020 - Day 2: Building a Reliable Collaboration Approach for API Tests
Hi everyone! Today is Day 2 of glorious Wintertainment 2020 where we are sharing information about testing trends and pro tips on using SmartBear products with you! Today, we are going to be talking about building a reliable collaboration approach for API tests. Check out this great article written by an API testing pro from SmartBear - @TSanchez_1!
Answer the questions provided at the end of the article and share your thought on the topic to get a chance to win a special prize from our team! See event details and article schedule here.
Building a Reliable Collaboration Approach for API Tests
I believe treating tests as you would treat code is important, and there is no better way to do so than to follow the most common type of practice in the industry, using GIT. With ReadyAPI’s native Git provider integration we make collaborating with GIT providers a breeze. Let's walk through the process.
The first thing you need to understand is that ReadyAPI default projects are XML flat files. Meaning that it is one file for all the work you do in ReadyAPI. To make these files flexible for collaboration we need to turn them into Composite Projects.
No need to worry, asReadyAPI does this automatically for you. First, make sure your project is highlighted in the navigator and click on the Git Icon on the top, right-hand side of the screen. You can either click on Connect to GIT or create a local repo.For the sake of this blog, I will choosea remote repository and will use GitHub, but it is the same process for all Git providers.
On the following screen you will be able to connect your Git provider account to ReadyAPI, or choose from an existing one.
The next step is important, please make sure the repository is already created on your GIT provider so your project has a home.You can choose it or search the list.
Once you have chosen a repository for your project, a Git panel will appear on the right-hand side of ReadyAPI.It hasall the GIT action necessary to make sure your projects stay coordinated with the repository, and any work that needs to be pushed or pulled fromit.
Now that we have setup a remote repository to share API tests within or across teams, let us go through a simple exercise.
1. Create a new test in ReadyAPI Test.
2. Save the project (saveslocally first) by clicking on the Save button.
3. As a best practice, confirm all the changes that were made under Uncommitted changes.
4. Once you are ready to commit your changes, press the Commit button and make sure there is a meaningful Commit message for traceability.
5. Finally push your changes to the repo by clicking the Push button.
Lastly, as with any VCS process, there are changes that may happen by multiple teams at once.If your branch is behind, you will see by how many commits under the branch dropdown. If you decide to pull changes, and there are conflicts, you will get a message advising so.AMerge Conflict Dialogwill help you make the right decisions. Please refer to the screenshots below for more.
On the Merge Conflict Dialog,you can clearly see what the conflicts are, and you can decide to choose from “Yours” (local project) or “Theirs” (remote project). In this case, the changes happened on the payload, hence the yellow triangle symbol showing the difference.You can see the details in the Property details section at the bottom.
As shown above,ReadyAPI makes it easy for teams to create meaningful and reusable tests across an organization or single team. By following similar practices to code, you can create object-oriented tests in ReadyAPI as your API test authoring tool, and make the collaboration process efficient at the same time. Now that you know about this functionality, go take itfor a spin!