
What is REST? Why is it Needed
REST (Representational State of Transfer) is a lightweight option for developing web services the uses the HTTP protocol –a fact that makes is simpler with less overhead than a web service that uses the SOAP protocol.
Today we’ll be looking at soapUI but you can also programmatically test a rest service using a library like rest-assured without using a vendor tool.
(If you’re interested in learning how to use soapUI to test SOAP web services, check out my post/video: soapUI – How to test a web service.)
Twitter API
For this example, I’ll be using the Twitter API (GET statuses/user_timeline Resource) to perform a search for and return the last five tweets on my Twitter timeline:
https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=jcolantonio&count=5
How to use soapUI to test REST service
Here are the steps to follow to get started using the free version of soapUI with REST testing:
-
- Create a new project in soapUI named TWITTER REST (make sure you select the Opens dialog to create REST Service); click “OK”
- Create a new project in soapUI named TWITTER REST (make sure you select the Opens dialog to create REST Service); click “OK”

-
-
In the New REST Service dialog, enter the Service Endpoint:
https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=jcolantonio&count=5
- Click on the “Extract Resource/Method” and click “OK”
-

-
- On the New REST Resource dialog, click on the “Extract Params” button. You should have two parameters named id and count. Click “OK”
- On the New REST Resource dialog, click on the “Extract Params” button. You should have two parameters named id and count. Click “OK”

-
- In the New REST Method dialog, enter the Method Name, “GET JOE TIMELINE” and click “OK”
- In the New REST Method dialog, enter the Method Name, “GET JOE TIMELINE” and click “OK”

-
- Click on the “GET JOE TIMELINE” Request 1 and click on the green run arrow
- Click on the “GET JOE TIMELINE” Request 1 and click on the green run arrow

- Cool! You should be able to see the XML results returned from the Twitter service:

Now let’s add assertions to validate the response
In order to verify that the correct response has been returned, you’ll need to add an assertion. For this example our assertion is going to verify that five twitter entries were indeed returned by response of the service.
-
- First, click on the request’s “Add this REST request to a testcase” icon.
- First, click on the request’s “Add this REST request to a testcase” icon.

-
- Name the testsuite “TWITTER REST,” and the TestCase “GET TIMELINE.”
- Add the Request to TestCase. Accept all the default values and click “OK.”
- Name the testsuite “TWITTER REST,” and the TestCase “GET TIMELINE.”

-
- You should now have a TWITTER REST testsuite under your soapUI project:
- You should now have a TWITTER REST testsuite under your soapUI project:

Click on “GET JOE TIMELINE” Request and click “Assertions” then click on the “Add an assertion” icon.

-
- In the “Add Assertion” screen, click on Property
Content>XPath Match and click the “Add” button.
- In the “Add Assertion” screen, click on Property

-
- For the XPath Expression, enter:
- For the XPath Expression, enter:
declare namespace ns1='http://www.w3.org/2005/Atom'; count(//ns1:feed/ns1:entry)
-
- Expected Result: enter “5.”
- Expected Result: enter “5.”

- Click the “Save” button and re-run.
- Your “assertion” should be green.

How to Test a REST service and Rest Easy
That’s it! You can now rest easy in the knowledge that you now know how to test a REST service using soapUI!
Joe Colantonio is the founder of TestGuild, an industry-leading platform for automation testing and software testing tools. With over 25 years of hands-on experience, he has worked with top enterprise companies, helped develop early test automation tools and frameworks, and runs the largest online automation testing conference, Automation Guild.
Joe is also the author of Automation Awesomeness: 260 Actionable Affirmations To Improve Your QA & Automation Testing Skills and the host of the TestGuild podcast, which he has released weekly since 2014, making it the longest-running podcast dedicated to automation testing. Over the years, he has interviewed top thought leaders in DevOps, AI-driven test automation, and software quality, shaping the conversation in the industry.
With a reach of over 400,000 across his YouTube channel, LinkedIn, email list, and other social channels, Joe’s insights impact thousands of testers and engineers worldwide.
He has worked with some of the top companies in software testing and automation, including Tricentis, Keysight, Applitools, and BrowserStack, as sponsors and partners, helping them connect with the right audience in the automation testing space.
Follow him on LinkedIn or check out more at TestGuild.com.
Related Posts
Look, I’ve been doing test automation for over 25 years. I’ve heard the predictions. “Manual testing is dead.” “AI will […]
The 72.8% Paradox That Changes Everything After interviewing 50+ testing experts in 2025 and analyzing data from our 40,000+ member […]
Look, I’ve been doing this testing thing for over 25 years now. I first wrote about the AI “three waves” […]
What’s New in Low-Code/No-Code Testing for 2026 A lot had changed on the The low-code/no-code testing space and it has […]



