Half Day Tutorial: RESTful API Testing in Ruby

As automation testing suites mature, the need to create maintainable tests increase. Creating easy reusable test harnesses becomes imperative, otherwise the test suites become outdated and cumbersome to the software development process. Furthermore, applications continue to push forward into a more service level architecture. This growth in RESTful services means our automated testing suites need to be robust and maintainable enough for the demand.

In this hands-on tutorial through a user story driven approach, you will learn how to create a robust RESTful API testing harness. You will learn guidelines on how to introduce good object-oriented design patterns for readable code. You will create common utility methods to wrap around third party libraries. Finally, you will build a data management layer for your calls’ payloads and parameters. Ruby and an existing local RESTful API will be used for training purposes, but the insights you gain are transferrable to any programming language and API.

Learning Objectives:

  • Review what a common RESTful API Testing suite can look like
  • Introduce good programming principles to the suite
  • Learning about key layers to build in the suite
  • Covering key design questions you will have to answer

Tutorial Outline:

  • In the Beginning
    • The basics of REST
    • The Why of API Testing
    • The How of API Testing
    • Showing the pitfalls of standard testing suites
    • Key programming patterns we will introduce
  • Bringing the Utility
    • Wrapping third party calls inside utility methods
    • Adding good error management
  • Adding Good Object Oriented Principles
    • Wrapping API endpoints into a Page Object pattern
    • Showing how OOP convention over configuration can add reuse and maintainability with added utility methods
  • Handling your Data
    • Creating a layer for data management
    • Combining it with your API Objects for dynamic data call creation
  • Extra Features to Add
    • Using Rake to make dynamic runs easier
    • Adding Cucumber and BDD
    • Making reusable steps

Note:  Ruby installation (2.3.3 preferred)

Location: PradoDate: May 14, 2019Time: 1:00 pm - 4:30 pm Jamie Kelley