How Can You Use Unified Functional Testing to Test Web Services and REST APIs?

unified functional testing

Introduction

APIs run the modern digital world. Every mobile app, web app, banking system, insurance platform, or e-commerce website exchanges data through web services and REST APIs. When these APIs fail, the entire application fails. This is why companies rely on automation engineers who can validate APIs early.
This is where Unified Functional Testing, once known as QuickTest Professional or HP QTP, becomes a powerful ally.

UFT is widely known as a functional testing tool for UI automation. But what many new testers do not know is that UFT also provides a strong framework for API testing, offering options to test SOAP services and REST endpoints with simple request models, checkpoints, custom code, and powerful reporting features.

In this blog, you will learn how to use unified functional testing to test APIs, validate messages, add checkpoints, parameterize inputs, automate test flows, and integrate API testing into CI pipelines. Whether you work on banking, healthcare, telecom, or e-commerce projects, API testing in Unified Functional Testing will help you catch issues faster and build stable automation frameworks.

Why API Testing in UFT Matters Today

quicktest professional
Concept of Testing. Technology. Internet and networking

API testing has become a critical part of QA because:

  • 70% of application logic resides in APIs
  • UI layers change often, but APIs remain stable
  • API defects cost 4x more to fix in production
  • API tests execute faster than UI tests
  • Shift-left automation demands early API validation

Organizations need automation testers who can use UFT software testing not only for UI flows but also for API validations.

With API testing features built inside UFT testing tool, testers can run web service calls, validate responses, extract values, reuse data, and combine UI + API flows in the same test.

UFT as an API Testing Tool: An Overview

UFT provides API testing through the Service Test and API Test modules. These modules allow you to:

  • Test SOAP-based web services
  • Test REST APIs
  • Build test flows visuall
  • Use drag-and-drop components
  • Add checkpoints
  • Use built-in data models
  • Write VBScript for dynamic logic

This makes UFT a hybrid tool:
UI Testing + API Testing + Integration Testing in one automation tool.

How UFT Works with Web Services and REST APIs

UFT allows automation testers to:

  1. Add a service or REST endpoint
  2. Create a test activity model
  3. Configure request parameters
  4. Send the request
  5. Validate the response
  6. Add checkpoints
  7. Store extracted values for later steps
  8. Log output in UFT reports

This flow makes it simple for testers who come from manual testing or qtp testing backgrounds.

Starting Your First API Test in UFT (Step-by-Step)

Below is a beginner-friendly walkthrough.

Step 1: Launch UFT and Create a New API Test

  • Open UFT
  • Select API Test
  • UFT creates a blank canvas with a flow diagram

This interface works like a graphic test designer. You drag blocks, connect them, and create the test logic.

Step 2: Add a REST Service or WSDL

To test SOAP web services:

  • Go to Add Service → Add WSDL
  • Provide the WSDL URL

Example (SOAP):

http://www.webservicex.net/geoipservice.asmx?WSDL

To test REST services:

  • Go to Add REST Service
  • Enter the base URL

Example (REST):

https://reqres.in/api/users

UFT then imports all operations (GET, POST, PUT, DELETE).

Step 3: Add an Activity to the Test Canvas

Drag an operation like:

  • GET Request
  • POST Request
  • SOAP Operation

onto the test flow.

Example REST GET activity:

GET – https://reqres.in/api/users?page=2

Step 4: Configure the Request Parameters

Under the activity:

  • Enter URL parameters
  • Enter headers (Content-Type, Accept)
  • Enter body for POST/PUT

Example headers for JSON-based APIs:

Content-Type: application/json

Accept: application/json

Example JSON body for a POST request:

{

  “name”: “John”,

  “job”: “QA Engineer”

}

UFT supports:

  • XML
  • JSON
  • Plain text

Step 5: Run the Request and View the Response

Click Run.

UFT displays:

  • HTTP Status Code
  • Response Headers
  • Response Body
  • Execution Time
  • Checkpoint Results

This response acts as a baseline for validations.

Checkpoint Types in UFT API Testing

Checkpoints allow testers to validate:

✔ Status Code Checkpoints

Verify the expected code:

  • 200 OK
  • 201 Created
  • 400 Bad Request
  • 500 Internal Server Error

Example:

Expected Status: 200

✔ Body Content Checkpoints

Validate:

  • Fields
  • Text
  • Data types
  • Values

Example for JSON field:

response.data.id = 10

✔ Schema Validation

Ensures API response follows the contract.

Example:

  • Email is a string
  • ID is an integer
  • Support URL is a valid URL

✔ XML Node Validation (SOAP)

Validate nodes using XPath.

✔ Header Validation

Check headers like:

  • Server
  • Content-Type
  • Cache-Control

These checkpoints make API testing reliable in real-time projects.

Parameterization in UFT for Dynamic API Tests

In real-time API automation:

  • Inputs change
  • Values repeat
  • Data must be reusable

UFT allows parameterization through:

  • DataTable
  • Environment Variables
  • Input Parameters
  • Excel Sheets

Example:

Using DataTable fields:

name = DataTable(“Name”, “Global”)

job  = DataTable(“JobRole”, “Global”)

Used inside JSON body during POST.

This reduces maintenance and makes tests reusable.

Extracting Values from API Responses

Often, you need to capture data from one API and use it in another.

For example:

  1. POST /users → returns user_id
  2. GET /users/{id} → validate the user

UFT supports:

  • XPath (XML) extraction
  • JSON path extraction
  • Custom VBScript extraction

Example VBScript for JSON extraction:

Dim json

Set json = DictionaryFromJSON(ResponseBody)

userid = json(“data”)(“id”)

This helps build chained API flows.

Chaining API Requests in UFT

Real-time projects require chaining like:

  • Create → Update → Delete
  • Login → Validate → Logout
  • Add Item → Get Cart → Checkout

UFT provides a “flow” canvas where you connect activities like:

POST → GET → PUT → DELETE

Each step uses output from the previous step.

Authentication Handling in UFT API Testing

Modern APIs require authentication.
UFT supports:

  • OAuth 2.0
  • Basic Authentication
  • Bearer Tokens
  • API Keys
  • JWT Tokens
  • Custom Header Authentication

Example: Bearer Token Header

Authorization: Bearer {{access_token}}

UFT can store tokens as environment variables for reuse across activities.

Mocking APIs Using UFT

In early development phases, backend services may be unavailable.

UFT allows creation of:

  • Mock responses
  • Virtual services
  • Simulated endpoints

This is extremely helpful in integration testing.

Using VBScript for Custom API Logic in UFT

UFT offers simple scripting using VBScript.

Example: Validate Response Length

If Len(ResponseBody) > 0 Then

   Reporter.ReportEvent micPass, “Validation”, “Response received successfully”

Else

   Reporter.ReportEvent micFail, “Validation”, “Empty response”

End If

Example: Logging Custom Output

Reporter.ReportEvent micDone, “UserID Returned”, userId

Custom scripting gives more control to automation engineers.

Real-Time Industry Examples

1. Banking API Validation

Validate:

  • Balance API
  • Transaction API
  • Loan eligibility API
  • Authentication API

Example:

GET /account/balance?acctNo=12345

UFT validates:

  • Balance format
  • JSON structure
  • Status codes

2. Healthcare API Automation

Examples:

  • Patient records
  • Lab results
  • Insurance verification
  • Appointment scheduling

UFT validates compliance APIs with HIPAA-safe workflows.

3. E-Commerce API Testing

Examples:

  • Product search
  • Cart management
  • Checkout
  • Payments
  • Order tracking

A typical chain uses:

POST /addItem  

GET /cart  

POST /checkout  

GET /orderStatus

UFT test flows work perfectly for this.

4. Telecom Billing APIs

Examples:

  • Subscriber lookup
  • Data usage
  • Bill generation
  • Recharge workflow

UFT is widely used in telecom for API + UI regression test suites.

Debugging and Troubleshooting in UFT API Tests

UFT provides debugging tools like:

  • Watch variables
  • Log viewer
  • Service call trace
  • Raw request sender
  • Response comparison tool

Common debugging tasks include:

  • Validate URL endpoints
  • Check headers
  • Analyze error codes
  • Compare schemas
  • Retry failed requests

Reporting and Test Logging in UFT

UFT generates clean HTML reports that show:

  • Request URL
  • Request body
  • Status code
  • Response time
  • Checkpoint results
  • Custom log messages

These reports help QA teams share results easily.

Integrating API Tests with CI/CD Pipelines

quicktest professional

API tests can run in:

  • Jenkins
  • Azure DevOps
  • GitLab CI
  • Bamboo

Teams use UFT batch mode or ALM integration.

Continuous integration improves:

  • Release cycles
  • Quality
  • Early defect detection

Combining UI and API Testing in UFT

One of the biggest strengths of UFT is combining:

  • API tests for backend
  • UI tests for front-end

Example:

  1. POST order through API
  2. Validate order in UI
  3. Update through UI
  4. Validate via API

Full end-to-end coverage in a single tool.

Advanced UFT API Test Features

✔ Data Model Editor

Create reusable schema models.

✔ Custom Checkpoints

Write logic-based validations.

✔ API Dependency Mapping

Auto-build relationships.

✔ HTTP Watcher

Monitor API traffic.

✔ Service Sniffer

Capture live requests.

Key Takeaways

  • UFT supports SOAP and REST API testing.
  • You can test APIs with zero coding or full scripting.
  • Checkpoints validate response status, body, headers, and schema.
  • Parameterization helps build maintainable test flows.
  • Chaining API calls helps replicate real business workflows.
  • UFT allows UI + API integration tests in one environment.
  • Strong debugging, logging, and reporting tools improve QA efficiency.

Conclusion

UFT makes web service and REST API testing simple, powerful, and scalable for modern automation teams. Start practicing these techniques through real-time scenarios and hands-on activities to build stronger automation skills. When you apply these methods consistently, uft software testing helps you design stable API flows, improve validation accuracy, and work confidently on complex automation tasks. These skills will strengthen your expertise and help you grow faster in your QA career using unified functional testing. If you want more detailed guides like this, just tell me your next topic!