Mastering REST Assured for REST API Test Automation
(including Maven and JUnit) - 21 hours

Course available as online Interactive
Course available to schedule for your team
Learn More
Concepts

This practical course offers comprehensive knowledge on REST API test automation, employing the widely acclaimed Java library, REST Assured. Participants will gain insights into the functioning of the HTTP protocol and the principles underlying the REST design pattern. The course covers scripting for automating HTTP communication, both with and without Gherkin language integration within REST Assured. Participants will also learn techniques for validating JSON response values. Within Maven projects, you'll integrate REST Assured with JUnit, a renowned framework for unit and functional test automation, enabling the creation of efficient scripts.


Audience

This comprehensive course is designed for individuals aiming to leverage their Java skills for the highly sought-after profession of test automation engineering


Pre-requisites

Proficiency in Java with IDE of your choice (Eclipse is preferred)
We recommend completing our course “Mastering Java for Testers.


What participants will learn?
  1. In-depth understanding of the HTTP protocol
  2. Analysis of JSON message structures
  3. Application of the REST design pattern
  4. Utilizing Advanced Rest Client (ARC) for manual REST API testing
  5. Creating Maven projects that integrate REST Assured with JUnit
  6. Writing tests with REST Assured employing the Gherkin language style
  7. Extracting response values using JSONPath
  8. Mapping JSON responses to Java classes
  9. Utilizing additional libraries such as Lombok and Javers for comprehensive testing

Course Outline
  • Maven as a software project management tool
    • Maven lifecycles
    • Phases and goals
    • Dependency management with pom.xml
    • Maven project structure
  • JUnit as a functional testing framework
    • JUnit test classes and test methods
    • JUnit test structure
    • JUnit annotations
    • Assertions
    • Data-driven parameterized tests
  • HTTP protocol
    • Structure of requests and responses
    • Request methods and headers
    • Response status codes and headers
  • JSON message format
  • REST design pattern
  • Advanced REST browser client (ARC) for manual testing
  • Using REST Assured
    • Creating Maven projects with JUnit and REST Assured
    • Hamcrest assertions
    • Automating CRUD (Create/Read/Update/Delete) methods
    • Writing scripts in Gherkin language
    • Writing scripts without Gherkin
    • Using JSONPath
    • Using request and response specification classes
    • Mapping responses to POJOs (Plain Old Java Objects)
    • Adding Lombok library
    • Using Javers library for full POJO value comparison