QuickTest Pro How to Test a REST Service
In this video, I show a quick example on how to use QuickTest Pro 11 and WinHttp to test a REST service. The QTP web-addin is not needed for this example.
Below is the code used for this example:
Set myRestBody = XMLUtil.CreateXMLFromFile("C:body.xml")
restRequest = myRestBody.ToString
url ="http://localhost:24240/HPFlights_REST/FlightOrders/"
contentType ="text/XML"
'1) Create reference to the WinHTTP request com object
Set oWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
'2) Open a HTTP connection to a HTTP resource
oWinHttp.Open "POST", url, False
'3) Add a HTTP request headers for endpoint and conent type
oWinHttp.setRequestHeader "Content-Type", contentType oWinHttp.setRequestHeader "SOAPAction", url
'4) Send a HTTP request to the HTTP server with the header and body info
oWinHttp.Send restRequest
'5) Get response
response = oWinHttp.ResponseText
'6) Close object reference
Set oWinHttp = Nothing
'7) print the response
print response
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
Bottom Line: Kobiton is the first real device testing platform I’ve seen that makes AI-powered mobile testing feel like it […]
Look, most of the AI testing tools I cover on the TestGuild Automation Podcast share two things in common: they’re […]
At least one in five people has some kind of impairment, so it’s important to have them in mind when […]
Last Updated: April 18, 2026 By Joe Colantonio — 25+ years in testing, 500+ podcast interviews with tool creators Full […]



