Course: REST Assured API Testing
duration: 38 hours |
Language: English (US) |
access duration: 180 days |

Details
In this course, you will learn how to use REST Assured, a Java-based library for testing and validating RESTful APIs. You will explore the fundamentals of API testing, including the REST architecture and the importance of API testing. You will set up your development environment using IntelliJ IDEA and Maven, execute REST Assured tests using TestNG, and validate API responses. The course covers sending GET requests, using REST Assured functions, and performing detailed response validations.
You will also learn how to integrate Hamcrest matchers for flexible API testing, validate JSON responses and schemas, and work with different HTTP verbs for API testing. The course includes data-driven testing with TestNG, focusing on efficient test execution and management. You will dive into API authentication methods, including OAuth, and learn advanced testing techniques such as transient error handling and fault injection.
You will also explore CI/CD pipelines for API testing with Jenkins and GitHub Actions, and integrate the Extent and Allure reporting frameworks for detailed test reporting. The course also covers mocking API endpoints with WireMock and performing load tests with Apache JMeter.
Finally, the course provides a live lab environment with exercises to practice REST Assured skills, including GET requests, integrating REST Assured with Hamcrest, validating JSON responses, implementing authentication, and extending API testing with advanced techniques.
Result
After this course, you will have gained more knowledge about:
- REST Assured and its use in testing APIs, setting up IntelliJ projects with Apache Maven, and running REST Assured tests with TestNG.
- HTTP requests and responses, viewing endpoints for API testing, using peek and print functions, and validating response headers and bodies with the Response Object.
- Hamcrest matchers, validating responses using Hamcrest matchers for numeric values, strings, collections, arrays, and Java objects.
- How to send requests with path, query, and named parameters, and how to perform tests with these parameters.
- Validate JSON responses and schemas using JSONPath, handle nested fields and arrays, and validate XML responses.
- Spring MVC applications and how to create and execute API endpoints, send various HTTP requests, and deserialize JSON responses into Java objects (POJOs).
- How to implement data-driven testing using TestNG, manage data from CSV, JSON, and Excel files, and test APIs with POJOs.
- How to authenticate APIs using Basic, Digest, and OAuth methods, including OAuth2, and perform end-to-end testing with authentication.
- Use REST Assured global variables, handle URL redirects, and write clean test code using inheritance and composition.
- Log request and response data, handle transient errors, and perform fault injection using Envoy Proxy.
- Set up CI/CD pipelines using Jenkins and GitHub Actions, automate API testing, and generate reports using Maven Surefire.
- Configure, customize, and integrate Extent and Allure reports into CI pipelines.
- Mock API endpoints using WireMock, load test with Apache JMeter, and validate responses using various assertions.
Prerequisites
Experience in the field is a plus.
Target audience
Tester
Content
REST Assured API Testing
REST Assured API Testing: Getting Started with REST Assured Testing
REST Assured is a Java-based library widely used for testing and validating RESTful application programming interfaces (APIs). It simplifies the process of sending HTTP requests to a web server and receiving responses, allowing testers to verify the status code, content, headers, and response time of the requests. In this course, you will dive into the essentials of API testing with a focus on REST Assured. You will learn about the significance of APIs, the basics of REST architecture, and why API testing is crucial for ensuring applications communicate effectively. Next, you will set up your development environment, starting with IntelliJ IDEA and a Maven project. With Apache Maven helping manage your project dependencies, you will execute REST Assured tests integrated with TestNG to validate successful API responses. Then you will learn to send GET requests, interpret status codes, and use REST Assured's peek and print functions. Finally, you will investigate response headers and bodies more critically and perform detailed validations, ensuring the responses meet your predefined expectations.
REST Assured API Testing: Using Hamcrest Matchers to Validate Responses
Hamcrest is a framework for writing matcher objects, facilitating the creation of flexible and expressive tests in Java. REST Assured has first class support for Hamcrest matchers to validate headers and responses from APIs. In this course, you will explore the capabilities of the Java Hamcrest library, a powerful tool for asserting various data types, including numeric values, strings, collections, and arrays with precision and flexibility. Next, you will expand your testing repertoire by integrating Hamcrest with REST Assured for sophisticated API testing. Then you will learn to ensure API responses meet expected schemas and contents using Hamcrest matchers and lambda expressions. Finally, you will discover how to specify path parameters in your URLs, use unnamed and named parameters, and specify query parameters for filtering the response.
REST Assured API Testing: Validating JSON Responses & Schemas
JSON response validation checks the response data to see whether it matches expectations. Schema validation against a JSON response involves comparing the actual application programming interface (API) response to a predefined JSON schema. This process helps identify mismatches, missing fields, or data type errors in the API response, ensuring that the API behaves correctly under various conditions and conforms to its specification. Begin this course by learning how to validate JSON responses and schemas using REST Assured and how to navigate JSON responses with JSONPath, accessing and validating nested structures and collections. Next, you will uncover the pivotal role of JSON schemas in API testing, generating and applying JSON schemas to define and validate the expected structure of API responses. Then you will explore validating response types and properties, ensuring adherence to required fields, and employing schema dialects to refine your validation strategies based on the schema documentation. Finally, you will investigate advanced validation techniques, including validating nested JSON objects and arrays and validating XML responses.
REST Assured API Testing: Testing Different Types of HTTP Endpoints
REST Assured offers techniques to test application programming interface (API) endpoints that support different HTTP verbs. REST Assured allows you to specify your request and response body as a serialized JSON string, JSON objects, or just plain old Java objects (POJOs). This makes working with requests and responses easier and more maintainable. In this course, you will learn how to host a REST API server using a Spring model-view-controller (MVC) in Java, focusing on the use case of building a bug-tracking application. Next, you will explore various request types beyond GET, including HEAD and OPTIONS for API discovery, and POST, PUT, PATCH, and DELETE for resource management on your server. Finally, you will investigate advanced techniques for optimizing your work with API responses and requests., including deserializing JSON responses into POJOs for easier data management, applying strategies for dealing with nested fields in response data, and streamlining your code with the Lombok library, which eliminates the need for boilerplate code.
REST Assured Configuration: Data-driven Testing with TestNG and REST Assured
Data-driven testing is a methodology where test scripts are executed and validated using data sets stored in external databases or files. This approach allows for a more flexible, scalable, and maintainable testing process, as it enables the testing of multiple scenarios with different data inputs without altering the test code. In this course, you will learn the essentials of data-driven testing with TestNG and REST Assured, focusing on API testing for a bug-tracking application programming interface (API) server. You will send API requests, incorporate query and path parameters, and write tests to validate server responses. Next, you use parameterized tests to efficiently test APIs with varying input data. Then you will learn to manage test data using TestNG data provider methods. You will store your test data in comma-separated values (CSV) and JSON files and learn how to eliminate repetitive code. Finally, you will use Apache Poi and the Poiji library for simplified Excel parsing to streamline the process of reading and parsing Excel files, and deserializing data into plain old JavaScript objects (POJOs) for API testing.
REST Assured Configuration: Making Authenticated Requests to APIs
Application programming interface (API) authentication is a cornerstone of web security, ensuring that only authorized users and applications can access protected resources. In this course, you will dive into the fundamentals of API testing and authentication techniques using Java and REST Assured. You will learn to authenticate API requests using both challenged and preemptive authentication methods. Additionally, you will explore the use of digest authentication to enhance the security of your API requests with cryptographic hashes. Next, you will discover how to authenticate to API endpoints using OAuth tokens, starting with the configuration of OAuth1 and then advancing to the industry standard OAuth2 for authorization. Finally, you will apply these authentication techniques in practical scenarios, setting up tests with credentials and generating random usernames to mimic real-user interactions. This hands-on approach will solidify your understanding of API authentication and prepare you for comprehensive end-to-end testing.
REST Assured Configuration: Architecting & Structuring API Tests
Architecting clean tests in REST Assured involves structuring your test code in a way that enhances maintainability, readability, and reusability, while efficiently validating the functionality and reliability of RESTful APIs. In this course, you will tackle the challenge of reducing boilerplate code in API testing for enhanced test efficiency and readability. You will learn to use REST Assured global variables and configure request and response objects to streamline your tests. You will also handle URL redirections, parameter configurations, and HTTP client settings to ensure robustness across various testing scenarios. Next, you will explore structuring your test suite through inheritance and composition to maintain a scalable and organized codebase. Then you will build a base class for shared functionality, allowing child classes to inherit and make use of reusable code in the base class. Finally, you will integrate your tests with the Maven build life cycle and set up distinct environments for development, testing, and production, ensuring that configurations remain separate and optimized for each stage.
REST Assured Configuration: Error Handling & Fault Injection in API Tests
Transient errors and fault injection are crucial concepts in enhancing software resilience, particularly in distributed and cloud-based systems where network unreliability can introduce sporadic failures. In this course, you will focus on enhancing your application programming interface (API) testing skills with Java RestAssured, starting with the core aspect of request and response logging. You will learn how detailed logging is essential for understanding the interactions between your tests and APIs, aiding in debugging and ensuring API behavior aligns with expectations. Next, you will tackle the challenges posed by transient errors in API testing, learning strategies for retrying test cases to enhance the reliability and stability of your test suite. Then you will explore solutions like custom retry logic and the use of libraries like Awaitility for handling asynchronous operations more elegantly. Finally, you will investigate advanced testing techniques using the Envoy Proxy for fault injection, enabling you to simulate various failure conditions and assess an API's robustness and error-handling capabilities.
REST Assured Configuration: Continuous Integration Pipelines for API Tests
Continuous integration and continuous delivery (CI/CD) pipelines for testing application programming interfaces (APIs) are automated workflows that integrate code changes, test executions, and deployment processes to ensure that APIs function correctly and are ready for production environments. In this course, you will learn the fundamentals of CI/CD and its significance in automating software testing. You will install Jenkins on your local machine and see how you can configure Jenkins to automate your builds and tests. Next, you will enhance your CI/CD pipelines by exploring advanced Jenkins features. You will set up both manually triggered and scheduled builds for testing, examine the inefficiencies of polling GitHub repositories for changes, and use WebHook triggers and GitHub push notifications for more efficient build triggers. Finally, you will create a continuous integration pipeline using GitHub Actions. You will integrate Java RestAssured API tests into the GitHub repository's life cycle, configure Surefire reports to generate detailed test reports, and set up workflows to send email alerts upon test completion or failure.
REST Assured Techniques: Integrating Reporting with REST Assured API Testing
Reporting in tests is essential for providing visibility into the health, performance, and reliability of software applications, allowing teams to make informed decisions about releases and maintenance. Extent Reports and Allure Reports are powerful tools in this domain, offering rich, interactive dashboards that detail test executions, highlight failures, and track trends over time. In this course, you will explore the crucial role of integrating reports with tests in software development projects. You will get an overview of the strengths and weaknesses of Extent and Allure reporting frameworks. You will first create and customize Extent Reports. You will learn to abstract reporting details using the ITestListener interface in TestNG for a cleaner and more maintainable test suite. You will also discover how to add request and response details to your reports and integrate your reporting with a GitHub Actions automated continuous integration pipeline, enhancing your testing workflow. Finally, you will delve into configuring Allure Reporting for your tests. You will organize your tests with Allure's features such as Epics, Features, and Steps, and learn to present request and response details effectively. The integration of Allure Reports with GitHub Actions will conclude your learning, equipping you with comprehensive skills in test reporting.
REST Assured Techniques: Using WireMock API Mocking & JMeter Load Testing
Mocking application programming interface (API) endpoints is essential for developing, testing, and validating applications independently of external systems. Load testing of APIs is crucial for assessing an application's performance and reliability under high traffic conditions, ensuring that it can handle real-world use without degradation of service. Together, WireMock and JMeter provide a comprehensive approach to testing for mocking and load testing respectively. In this course, you will explore the art of mocking APIs using WireMock, learning how to set up a basic server and mock API endpoints with various HTTP requests and responses. You will employ JSON files for configuring responses and explore dynamic response creation through response templating. You will use request matching to fine-tune the behavior of your API mocks and stub APIs using both Java and JSON for enhanced maintainability. Next, you will master the use of Apache JMeter for performance and load testing. Starting with the installation and setup, you will build JMeter test plans, simulate user actions with Test Groups, and make API requests using Samplers. You will learn how to analyze the responses with Listeners and validate API performance under different loads using JMeter assertions. You will run your load tests using the JMeter graphical user interface (GUI) as well as the command line.
REST Assured Sandbox
In this sandbox, you have access to a live lab environment to practice your REST Assured development skills. The Lab Configuration section details the devices, operating systems, tools, software and accounts available in the lab. In addition to all that's already available, internet access is enabled on all devices, allowing you to download additional software, libraries, datasets and virtually anything else that will help you practice. Lab Configuration •Devices - Ubuntu 22.04 •Software and Tools - Eclipse IDE - Anaconda - Apache Net Beans - IntelliJ IDEA - MongoDB - JDK 22.0.1 - Apache Tomcat - REST Assured 5.4.0+, - TestNG - Apache Jmeter - Apache POI - Poiji - Apache Commons CSV - Extent Reports - Allure Reports - WireMock - Ngrok - Envoy Proxy - Lombok
API Testing with REST Assured
The exercises presented in this lab include: Exercise 1 - Sending GET Requests and Validating Responses Exercise 2 - Integrating REST Assured With Hamcrest Exercise 3 - Validating JSON Response and Schema With REST Assured Exercise 4 - Implementing Basic and Digest Authentication Exercise 5 - Structuring REST Assured Test Suites with Inheritance and Composition Exercise 6 - Enhancing API Testing with REST Assured Exercise 7 - Configuring and Enhancing Extent Reports for Test Automation Exercise 8 - Configuring Assertions for API Testing in Apache JMeter Lab Configuration In this lab environment you are provided a Windows 10 virtual machine running with the following software included: Software/tools - Java 8 - Apache JMeter v5.41 - Apache Maven v3.6.3 - Intellij IDEA v2020.3.3 - Postman Dependencies - JUnit v4.13.2 - REST Assured v4.4.0 - Hamcrest v2.2 - TestNG v7.4.0 - Extent Reports v5.0.6 - JSON-Simple v1.1.1 - JSON Schema v1.11.0
Course options
We offer several optional training products to enhance your learning experience. If you are planning to use our training course in preperation for an official exam then whe highly recommend using these optional training products to ensure an optimal learning experience. Sometimes there is only a practice exam or/and practice lab available.
Optional practice exam (trial exam)
To supplement this training course you may add a special practice exam. This practice exam comprises a number of trial exams which are very similar to the real exam, both in terms of form and content. This is the ultimate way to test whether you are ready for the exam.
Optional practice lab
To supplement this training course you may add a special practice lab. You perform the tasks on real hardware and/or software applicable to your Lab. The labs are fully hosted in our cloud. The only thing you need to use our practice labs is a web browser. In the LiveLab environment you will find exercises which you can start immediately. The lab enviromentconsist of complete networks containing for example, clients, servers,etc. This is the ultimate way to gain extensive hands-on experience.
Sign In
WHY_ICTTRAININGEN
Via ons opleidingsconcept bespaar je tot 80% op trainingen
Start met leren wanneer je wilt. Je bepaalt zelf het gewenste tempo
Spar met medecursisten en profileer je als autoriteit in je vakgebied.
Ontvang na succesvolle afronding van je cursus het officiële certificaat van deelname van Icttrainingen.nl
Krijg inzicht in uitgebreide voortgangsinformatie van jezelf of je medewerkers
Kennis opdoen met interactieve e-learning en uitgebreide praktijkopdrachten door gecertificeerde docenten
Orderproces
Once we have processed your order and payment, we will give you access to your courses. If you still have any questions about our ordering process, please refer to the button below.
read more about the order process
Een zakelijk account aanmaken
Wanneer u besteld namens uw bedrijf doet u er goed aan om aan zakelijk account bij ons aan te maken. Tijdens het registratieproces kunt u hiervoor kiezen. U heeft vervolgens de mogelijkheden om de bedrijfsgegevens in te voeren, een referentie en een afwijkend factuuradres toe te voegen.
Betaalmogelijkheden
U heeft bij ons diverse betaalmogelijkheden. Bij alle betaalopties ontvangt u sowieso een factuur na de bestelling. Gaat uw werkgever betalen, dan kiest u voor betaling per factuur.

Cursisten aanmaken
Als u een zakelijk account heeft aangemaakt dan heeft u de optie om cursisten/medewerkers aan te maken onder uw account. Als u dus meerdere trainingen koopt, kunt u cursisten aanmaken en deze vervolgens uitdelen aan uw collega’s. De cursisten krijgen een e-mail met inloggegevens wanneer zij worden aangemaakt en wanneer zij een training hebben gekregen.
Voortgangsinformatie
Met een zakelijk account bent u automatisch beheerder van uw organisatie en kunt u naast cursisten ook managers aanmaken. Beheerders en managers kunnen tevens voortgang inzien van alle cursisten binnen uw organisatie.
What is included?
Certificate of participation | Yes |
Monitor Progress | Yes |
Award Winning E-learning | Yes |
Mobile ready | Yes |
Sharing knowledge | Unlimited access to our IT professionals community |
Study advice | Our consultants are here for you to advice about your study career and options |
Study materials | Certified teachers with in depth knowledge about the subject. |
Service | World's best service |
Platform
Na bestelling van je training krijg je toegang tot ons innovatieve leerplatform. Hier vind je al je gekochte (of gevolgde) trainingen, kan je eventueel cursisten aanmaken en krijg je toegang tot uitgebreide voortgangsinformatie.

FAQ
Niet gevonden wat je zocht? Bekijk alle vragen of neem contact op.