Book description
Boost your SoapUI capabilities to test RESTful and SOAP APIs with over 65 hands-on recipes
In Detail
Packed with practical guidance, this book will show you how to build core SoapUI skills, integrate open source libraries, and code the extra functionality needed to quickly overcome common and advanced API test problems.
Building up your skills, you will progress to more advanced topics such as Groovy scripting, testing secured services, load test concurrency issues, using plugins and developing your own!
So when out-of-the-box SoapUI can't do exactly what you need or the quick guidance you require just isn't there, then take, tweak, and use what you need from a broad range of practical examples in this book and customize your way to API testing success with coverage of SOAP, REST, and Groovy.
What You Will Learn
- Generate tests, refactor interfaces, and learn how to develop stub REST and SOAP service implementations using Java
- Create data-driven tests and check results using MySQL, in-memory H2 DB, MongoDB, file, and ActiveMQ datasources
- Develop dynamic data-driven REST and SOAP service mocks using Groovy scripting to quickly provide realistic test service implementations
- Automate functional and load tests and run mocks by creating Shell, Java, JUnit, Gradle, Groovy, and Maven scripts
- Test AWS and OAuth 2 cloud-based services including Dropbox and Google's Gmail API
Table of contents
-
SoapUI Cookbook
- Table of Contents
- SoapUI Cookbook
- Credits
- About the Author
- Acknowledgments
- About the Reviewers
- www.PacktPub.com
- Preface
-
1. Testing and Developing Web Service Stubs With SoapUI
- Introduction
- Generating a WSDL-first web service using SoapUI tool integration
- Developing a SOAP web service test-first
- Updating a SOAP project using a WSDL
- Updating SOAP projects using WSDL refactoring (Pro)
- Generating and developing a RESTful web service stub test-first
- Generating SoapUI tests with REST discovery (Pro)
-
2. Data-driven Testing and Using External Datasources
- Introduction
- Creating and checking data with the JDBC Request TestStep
- Parameterizing SQL queries with the JDBC Request TestStep
- Setting properties from an external file
- Importing CSV file data into an in-memory H2 database with Groovy
- Looping over CSV file data and driving tests with Groovy
- Querying MongoDB with Groovy
- Publishing, browsing, and consuming ActiveMQ JMS messages via the REST API
- 3. Developing and Deploying Dynamic REST and SOAP Mocks
-
4. Web Service Test Scenarios
- Introduction
- Testing WSDL and response WS-I compliance
- Testing SOAP response schema compliance
- Testing REST response XML schema compliance
- Testing response compliance using JSON schemas
- Testing and mocking SOAP (MTOM+XOP) attachments
- Testing HATEOAS links
- Testing polling style asynchronous REST services
- Testing asynchronous SOAP service callbacks
- Testing for e-mails with Groovy
- Testing files with Groovy
-
5. Automation and Scripting
- Introduction
- Running mocks from the command line
- Running tests from the command line
- Providing environment-specific properties
- Generating mock WAR files from the command line
- Running mocks and tests using Maven
- Running mocks and tests using Java and JUnit
- Running mocks and tests using Groovy scripts
- Running mocks and tests using Gradle
- 6. Reporting
-
7. Testing Secured Web Services
- Introduction
- Testing basic HTTP-authenticated RESTful web services
- Testing HTTP Digest-authenticated RESTful web services
- Testing HTTP form-authenticated RESTful web services
- Creating and using X.509 certificates to test web services over HTTPS
- Testing client certificate authenticated web services
- Securing mock services using X.509 certificates
- Testing WS-Security UsernameToken, Timestamp, and TransportBinding
- Scanning web service security vulnerabilities
-
8. Testing AWS and OAuth 2 Secured Cloud Services
- Introduction
- Testing Dropbox using a pregenerated OAuth 2 Access Token
- Testing Dropbox using OAuth 2 Authorization Code Grant flow
- Testing Dropbox using OAuth 2 Implicit Grant flow
- Testing the Gmail API using OAuth2
- Automating OAuth 2 authentication and consent
- Testing AWS services using Access Key authentication
-
9. Data-driven Load Testing With Custom Datasources
- Introduction
- Load testing data-driven TestCases concurrently with separate Groovy datasources
- Load testing data-driven TestCases concurrently with a shared Groovy datasource
- Load testing data-driven TestCases concurrently with a shared distributed datasource
- Running load tests using Maven, command line, Java, Groovy, and Gradle scripts
- 10. Using Plugins
-
11. Taking SoapUI Further
- Introduction
- Building, packaging, and running SoapUI from the source code
- Importing, building, running, and debugging SoapUI in Eclipse
- Developing a Groovy plugin with custom Action using Gradle
- Logging from extensions and scripts
- Prompting for user input with the UISupport class
- Creating a custom RequestFilter (Listener) plugin
- Creating a custom TestStep (Factory) plugin to check whether a file exists
- Index
Product information
- Title: SoapUI Cookbook
- Author(s):
- Release date: February 2015
- Publisher(s): Packt Publishing
- ISBN: 9781784394219
You might also like
book
Mastering SoapUI
Master the art of testing and automating your SOA using SoapUI About This Book Design real-time …
book
Java 11 Cookbook
Solutions for modular, functional, reactive, GUI, network, and multithreaded programming Key Features Explore the latest features …
book
Mockito Cookbook
Over 65 recipes to get you up and running with unit testing using Mockito In Detail …
book
Web Services Testing with soapUI
Starting with an overview of SOA and web services testing, this guide take you through a …