We're Hiring!
Take the next step in your career and work on diverse technology projects with cross-functional teams.
LEARN MORE
Mountain West Farm Bureau Insurance
office workers empowered by business technology solutions
BLOG
3
16
2018

Running REST Assured API Tests in VSTS Release Management

Last updated:
7.15.2021

What is REST Assured?

REST Assured is a popular Java based open source tool for testing and validating REST services. REST Assured uses Gherkin/Behavior Driven Development (BDD) language of given, when, then to create human readable executable specifications. REST Assured has built in support for performing REST based actions and validating the results. I have found it easy to use and read the tests.

Getting started with REST Assured

Maven is a tool used to create a standard way to build Java projects. I have used Maven off and on over the years with Java development. If you are new to Maven, I found this good tutorial for getting started with Maven. By following this tutorial, you will have a project you can begin using to create your REST Assured project.

Maven in 5 Minutes

Once you have the project created, adding the REST Assured dependencies is straightforward and there are a number of tutorials that walk through this. Here is the dependencies list. You can also look at my github repo at https://github.com/Deliveron/sample-rest-assured-api-tests

maven-rest-assured-dependencies.jpg

Authoring and Running in VSCode

When opening the folder in VSCode, VSCode will recognize the Maven project using Java and JUnit and recommend several extensions to install. I recommend doing accepting the recommendations. This enabled VSCode to handle compiling, maven dependencies, intellisense, and even the test runner to run the REST Assured tests.

vscode-extensions.jpg

The REST Assured tests are easy to author and using the given, when, then format provide human readable tests. As you can see in the image below, with using a couple extensions VSCode can execute and track test results.

Running Tests in Visual Studio Team Services (VSTS)One advantage of running API tests over UI tests is that they are much faster. This allows you run the tests as part of your software delivery pipeline to help ensure quality is maintained. In VSTS, the API tests are typically run in Release Management after the application has been deployed.

vsts-release-tasks.jpg

To run the REST Assured tests, use the Maven task above. Point the task to your POM.xml file. This will compile the test code and execute the tests.

VSTS Hosted Build Agents

Microsoft offers Windows, Linux, and MacOS Hosted Build Agents platforms depending on your needs. Some builds such as IOS require MacOS while others may need to run on Windows or Linux. For running REST Assured API tests, Maven and Java are installed on all 3 of the Hosted Agents. Regardless of the platform you need for your pipeline, you can run the REST Assured tests on any of the Hosted Agents.

The results of the REST Assured API tests are tracked with each release and you can use all of the built in features for managing the results including linking bugs and associating the tests back to requirements for traceability. As you can see below you can measure quality by requirement.

If you are looking for a RESTful services friendly framework and can use Java, REST Assured is good tool for doing this. REST Assured tests can easily be integrated into your VSTS Release for continuous delivery.

If you have any questions or comments, contact me on twitter athttps://twitter.com/mikedouglasdev

Recent Blog Posts

lunavi logo alternate white and yellow
3.13.2025
3
.
12
.
2025
Unlocking the Power of Azure Managed Services with Lunavi

Cloud computing has become the backbone of modern business, offering agility, scalability, and cost efficiency. But managing cloud environments while keeping costs under control and security airtight? That’s a challenge. Azure Managed Services streamline cloud operations, helping businesses optimize spending, enhance security, and future-proof applications. Lunavi provides the expertise and tools to make it happen—so you can focus on growth instead of IT headaches.

Learn more
lunavi logo alternate white and yellow
2.11.2025
2
.
7
.
2025
The Future of Test Automation: Key Trends Shaping 2025 and Beyond

Software testing has gone from a chore to a game-changer, thanks to automation. But in 2025, sticking to old methods means falling behind. Stay ahead by embracing the future of test automation—let’s explore the key trends shaping what’s next.

Learn more
lunavi logo alternate white and yellow
2.11.2025
1
.
23
.
2025
The Importance of Cross Browser Testing

Making sure users have a smooth experience across all these platforms is crucial for businesses to stay competitive. Cross-browser testing is now a key part of modern development. It helps teams find and fix problems like layout issues, broken features, or slow performance before users are affected. Let’s look at why cross-browser testing matters and explore tools that make it easier to get the job done.

Learn more