Ask a Question

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 Reliable Collaboration Approach for API Tests 


Creating reliable tests you can reuse and share across teams is an ideal state for those companies trying to accelerate their development process. With a collaborative approach, companies can become more efficient within or across teams. In ReadyAPI we follow a VCS (Version Control System) approach to test collaboration.  


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.  


Nneed to worryas ReadyAPI 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 choose a 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 has all the GIT action necessary to make sure your projects stay coordinated with the repository, and any work that needs to be pushed or pulled from it 



Now that we have set up a remote repository to share API tests within or across teams, let us go through a simple exercise. 

1. Create new test iReadyAPI Test. 

2. Save the project (saves locally 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. Iyour 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. A Merge Conflict Dialog will help you make the right decisions. Please refer to the screenshots below for more. 

image (17).png




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 it for a spin! 


Further Reading 


Release of Git provider integration: 


What do you think? Comment below! 


1. Do you constantly find yourself writing the same tests over and over? 

2. Are your teams working together when creating tests, and is the process as efficient as it could be? 

3. Are you looking to be more effective in test authoring across teams? 

SmartBear Alumni (Retired)