Training: REST Assured API Testing
Tester
38 uur
Engels (US)

Training: REST Assured API Testing

Snel navigeren naar:

  • Informatie
  • Inhoud
  • Kenmerken
  • Meer informatie
  • Reviews
  • FAQ

Productinformatie

In deze training leer je REST Assured gebruiken, een op Java gebaseerde bibliotheek voor het testen en valideren van RESTful API's. Je verkent de fundamenten van API testen, inclusief de REST architectuur en het belang van API testen. Je zult je ontwikkelomgeving opzetten met IntelliJ IDEA en Maven, REST Assured testen uitvoeren met TestNG en API responses valideren. De training behandelt het verzenden van GET requests, het gebruik van REST Assured functies en het uitvoeren van gedetailleerde respons validaties.

Je leert ook hoe je Hamcrest matchers integreert voor flexibele API testen, JSON responses en schema's valideert en werkt met verschillende HTTP verbs voor API testen. De training omvat datagedreven testen met TestNG, waarbij de nadruk ligt op efficiënte testuitvoering en -beheer. Je duikt in API-authenticatiemethoden, waaronder OAuth, en leert geavanceerde testtechnieken zoals transiënte foutafhandeling en foutinjectie.

Je verkent ook CI/CD pipelines voor API testen met Jenkins en GitHub Actions, en integreert de Extent en Allure rapportageframeworks voor gedetailleerde testrapportage. De training behandelt ook het mocken van API endpoints met WireMock en het uitvoeren van belastingtests met Apache JMeter.

Tot slot biedt de training een live labomgeving met oefeningen om REST Assured vaardigheden te oefenen, waaronder GET requests, het integreren van REST Assured met Hamcrest, het valideren van JSON responses, het implementeren van authenticatie en het uitbreiden van API testing met geavanceerde technieken.

Inhoud van de training

REST Assured API Testing

38 uur

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

Kenmerken

Docent inbegrepen
Bereidt voor op officieel examen
Engels (US)
38 uur
Tester
180 dagen online toegang
HBO

Meer informatie

Doelgroep Tester
Voorkennis

Ervaring in het werkgebied is een pré.

Resultaat

Na deze training heb je meer kennis opgedaan over:

  • REST Assured en het gebruik ervan bij het testen van API's, het opzetten van IntelliJ projecten met Apache Maven, en het uitvoeren van REST Assured tests met TestNG.
  • HTTP requests en responses, het bekijken van endpoints voor API testing, het gebruik van peek en print functies, en het valideren van response headers en bodies met het Response Object.
  • Hamcrest matchers, valideren van responses met Hamcrest matchers voor numerieke waarden, strings, collections, arrays en Java objecten.
  • Hoe verzoeken te versturen met path, query en named parameters, en hoe testen uit te voeren met deze parameters.
  • JSON antwoorden en schema's valideren met JSONPath, geneste velden en arrays verwerken en XML antwoorden valideren.
  • Spring MVC applicaties en hoe API endpoints te creëren en uit te voeren, verschillende HTTP requests te versturen en JSON responses te deserialiseren in Java objecten (POJOs).
  • Hoe data-gedreven testen te implementeren met TestNG, data te beheren van CSV, JSON en Excel bestanden, en API's te testen met POJOs.
  • Hoe API's te authenticeren met Basic, Digest en OAuth methodes, inclusief OAuth2, en end-to-end testen uit te voeren met authenticatie.
  • REST Assured globale variabelen gebruiken, URL redirects afhandelen en schone testcode schrijven met overerving en compositie.
  • Log verzoek- en responsgegevens, behandel fouten van voorbijgaande aard en voer foutinjectie uit met Envoy Proxy.
  • CI/CD pipelines opzetten met Jenkins en GitHub Actions, API testen automatiseren en rapporten genereren met Maven Surefire.
  • Extent en Allure rapporten configureren, aanpassen en integreren in CI pijplijnen.
  • Mock API endpoints met WireMock, loadtest met Apache JMeter en valideer reacties met verschillende asserties.

Positieve reacties van cursisten

Training: Leidinggeven aan de AI transformatie

Nuttige training. Het bestelproces verliep vlot, ik kon direct beginnen.

- Mike van Manen

Onbeperkt Leren Abonnement

Onbeperkt Leren aangeschaft omdat je veel waar voor je geld krijgt. Ik gebruik het nog maar kort, maar eerste indruk is goed.

- Floor van Dijk

Training: Leidinggeven aan de AI transformatie

Al jaren is icttrainingen.nl onze trouwe partner op het gebied van kennisontwikkeling voor onze IT-ers. Wij zijn blij dat wij door het platform van icttrainingen.nl maatwerk en een groot aanbod aan opleidingen kunnen bieden aan ons personeel.

- Loranne, Teamlead bij Inwork

Hoe gaat het te werk?

1

Training bestellen

Nadat je de training hebt besteld krijg je bevestiging per e-mail.

2

Toegang leerplatform

In de e-mail staat een link waarmee je toegang krijgt tot ons leerplatform.

3

Direct beginnen

Je kunt direct van start. Studeer vanaf nu waar en wanneer jij wilt.

4

Training afronden

Rond de training succesvol af en ontvang van ons een certificaat!

Veelgestelde vragen

Veelgestelde vragen

Op welke manieren kan ik betalen?

Je kunt bij ons betalen met iDEAL, PayPal, Creditcard, Bancontact en op factuur. Betaal je op factuur, dan kun je met de training starten zodra de betaling binnen is.

Hoe lang heb ik toegang tot de training?

Dit verschilt per training, maar meestal 180 dagen. Je kunt dit vinden onder het kopje ‘Kenmerken’.

Waar kan ik terecht als ik vragen heb?

Je kunt onze Learning & Development collega’s tijdens kantoortijden altijd bereiken via support@icttrainingen.nl of telefonisch via 026-8402941.

Background Frame
Background Frame

Onbeperkt leren

Met ons Unlimited concept kun je onbeperkt gebruikmaken van de trainingen op de website voor een vast bedrag per maand.

Bekijk de voordelen

Heb je nog twijfels?

Of gewoon een vraag over de training? Blijf er vooral niet mee zitten. We helpen je graag verder. Daar zijn we voor!

Contactopties