Skip to main content

SoapUI — REST and SOAP API Testing

What is SoapUI?

SoapUI is a dedicated API testing tool that supports both REST APIs and SOAP/WCF web services. Unlike Postman (which focuses on REST), SoapUI was built specifically for enterprise-grade API testing including SOAP services — making it the preferred tool in banking, insurance, government, and other legacy enterprise .NET environments.

Why Use SoapUI?

SOAP/WCF services are still widely used in enterprise India and globally — banking systems, ERP integrations, government APIs, payment gateways. Postman has limited SOAP support. SoapUI natively reads WSDL (Web Service Description Language) files and auto-generates all test requests, saving hours of manual setup.

Where is it Used?

ScenarioUse
SOAP/WCF service testing✅ Best tool available
Legacy enterprise integrations✅ Banking, insurance, ERP
REST API testing✅ Full support
Load and performance testing✅ SoapUI Pro version
Automated regression testing✅ Test suites with assertions
Mock services✅ Mock SOAP responses for testing

Key Benefits

  • WSDL import — auto-generates all SOAP requests from service description
  • REST + SOAP — one tool for both API types
  • Assertions — verify response content, status codes, response time
  • Test suites — sequence multiple requests with data passing between steps
  • Property transfer — pass data from one response to the next request
  • Free version — covers most testing needs
  • Enterprise standard — required skill in many Indian IT companies (TCS, Infosys, Wipro projects)

SoapUI is essential when working in enterprise .NET environments with legacy SOAP/WCF services.

Download

Download free: soapui.org/downloads/soapui

Postman vs SoapUI

FeaturePostmanSoapUI
REST API testing✅ Best✅ Good
SOAP/WCF services❌ Basic✅ Best
WSDL import✅ Auto-generates requests
Load testing✅ (Pro)
Mock services
Team collaboration✅ CloudLimited
Learning curveEasyModerate

Rule: REST APIs → Postman. Legacy SOAP/WCF → SoapUI.

Testing a REST API

Create Project

  1. File → New REST Project
  2. Base URL: http://localhost:5001

Add Requests

  1. Right-click project → Add Resource → Path: /api/students
  2. Right-click resource → Add Method → GET
  3. Click ▶ (Run) → see response

POST with JSON Body

Method: POST
URL: /api/students
Headers: Content-Type: application/json
Body: {"name": "Ravi Kumar", "className": "10th"}

Add JWT Auth

Headers tab → Add header:
Name: Authorization
Value: Bearer eyJhbGciOiJIUzI1NiIs...

Testing a SOAP/WCF Service

Import WSDL (Auto-generates all requests)

  1. File → New SOAP Project
  2. WSDL URL: http://your-service/SchoolService.svc?wsdl
  3. SoapUI reads WSDL → creates all operations automatically

Example SOAP Request

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sch="http://schoolmanagement.in/">
<soapenv:Header/>
<soapenv:Body>
<sch:GetStudentFees>
<sch:studentId>1001</sch:studentId>
<sch:academicYear>2024-25</sch:academicYear>
</sch:GetStudentFees>
</soapenv:Body>
</soapenv:Envelope>

Response:

<soap:Body>
<GetStudentFeesResponse>
<TotalFees>60000</TotalFees>
<PaidAmount>30000</PaidAmount>
<Balance>30000</Balance>
<IsOverdue>false</IsOverdue>
</GetStudentFeesResponse>
</soap:Body>

⌨️ SoapUI Shortcuts

ShortcutAction
Enter / Alt+EnterSubmit request
Ctrl+NNew project
Ctrl+WClose tab
Ctrl+FFind in request/response
Ctrl+ZUndo
F5Run test suite
F8Run test case

Assertions — Verify Responses

Right-click request → Add Assertion:

AssertionChecks
Valid HTTP Status CodesStatus = 200, 201, etc.
ContainsBody has specific text
Not ContainsBody does NOT have text
JsonPath MatchJSON field equals value
XPath MatchXML node equals value (SOAP)
Response SLAResponse under N milliseconds
Schema ComplianceResponse matches JSON/XML schema
JsonPath Assertion example:
Expression: $.name
Expected: Ravi Kumar

Test Suites — Automated Sequences

📁 Test Suite: Student CRUD
📋 Test Case: Full CRUD Flow
Step 1: POST /students → create (save ID)
Step 2: GET /students/1 → verify created
Step 3: PUT /students/1 → update
Step 4: GET /students/1 → verify updated
Step 5: DELETE /students/1 → cleanup

Run: Right-click Test Suite → Run All Tests

Property Transfer — Pass Data Between Steps

Transfer id from POST response to GET/PUT/DELETE:

  1. Add Property Transfer step after POST
  2. Source: Response → JSONPath: $.id
  3. Target: Test Case Properties → studentId
  4. Use in URL: http://localhost:5001/api/students/${#TestCase#studentId}

SoapUI Interview Questions

Q1: When would you use SoapUI over Postman?

SoapUI when: project uses SOAP/WCF services, need WSDL import,
need load testing, need XML assertion.
Postman when: REST APIs, team collaboration, modern workflows.

Q2: What is WSDL?

Web Services Description Language — XML document that describes a SOAP service:
- Available operations (methods)
- Request/response message format
- Service endpoint URL
SoapUI reads WSDL and auto-generates test requests.

Q3: What is the difference between REST and SOAP?

REST → HTTP, JSON, stateless, lightweight, modern (ASP.NET Core Web API)
SOAP → XML envelope, strict contract (WSDL), older enterprise systems
REST is standard for new projects.
SOAP is common in banking, insurance, legacy enterprise systems.

Q4: What are SoapUI assertions?

Verifications that run after a response is received.
Similar to unit test assertions but for HTTP responses.
Examples: status code = 200, body contains "Ravi", response < 500ms.
🤖Use AI to Learn Faster

Use ChatGPT, Claude, or Copilot to go deeper on SoapUI REST and SOAP testing. Try these prompts:

  • "When should I use SoapUI instead of Postman for API testing?"
  • "What is WSDL and how does SoapUI use it to test SOAP services?"
  • "What is the difference between REST and SOAP web services?"
  • "Quiz me on SoapUI — 5 questions about SOAP, WSDL, and API testing"

💡 Tip: After reading this article, paste your own code into AI and ask "What could go wrong here and why?" — fastest way to find edge cases and deepen understanding.

nexcoding.in