Skip to main content
  • Log in
  • Manage Cookies
EclipseCon - Eclipse Foundation
  • Conference
    • News
    • Registration
    • Program Schedule
    • Program List
    • Community Day
    • Keynotes
  • Sponsors
    • Our Sponsors
    • Sponsor Testimonials
    • Be a Sponsor
    • Sponsor Guidelines
  • Community
    • 2021 Speakers
    • Speaker Guidelines
    • Code of Conduct
    • Community Resources
    • Conference Guide Documents
    • Information for Speakers
  • About Us
    • EclipseCon 2021
    • Program Committee
    • The Eclipse Foundation
    • Past Conferences
    • Other Events
  • Code of Conduct
  1. Home
  2. EclipseCon
  3. EclipseCon 2021
  4. Sessions
  5. Automated testing of OpenAPI-described RESTful microservices utilizing open source tools

Automated testing of OpenAPI-described RESTful microservices utilizing open source tools

Session details
Status: 
Accepted
Speaker(s): 
Michael Siemaszko (Self-employed)
Experience level: 
Beginner
Tags: 
OpenAPI
Swagger
RESTful microservices
automated REST API testing
automated test generation
Session Track: 
All Things Quality
Session Type: 
Standard

Surprisingly, even though RESTful microservices are everywhere nowadays, open source tools for automated testing of such hardly exist.

How about tools which can consume the OpenAPI (Swagger) description of REST APIs and generate tests, including test data, based on this information? Such automated testing nirvana truly exists!

In this purely practical presentation, based on a recent deployment on a commercial project for my current client, Data In Motion Consulting GmbH (https://www.datainmotion.de/), I will show you how to implement an always in-sync, fully automated OpenAPI-described RESTful microservices testing solution with freely available open-source tools, including:

  • automated generation of REST API smoke test scripts, utilizing the OpenAPI (Swagger) spec and the K6 (https://k6.io/) OpenAPI generator (https://openapi-generator.tech/)

  • automated extraction of test data from examples specified in the OpenAPI (Swagger) spec, for a self-contained, ready-to-run REST API test script

  • adding new K6 OpenAPI generator test generation template for automated generation of REST API load tests, in addition to REST API smoke tests

  • adding support for automated OAuth 2.0 authentication of REST API calls

  • integrating into Jenkins CI/CD pipeline the automated generation of REST API tests as well as automated testing of REST APIs via generated test scripts

As you will see, the benefits of describing RESTful microservices with OpenAPI (Swagger) go way beyond living documentation. With freely available open-source tools, your REST APIs can all be tested now automatically. What’s most important, being automatically generated from the OpenAPI description of REST APIs, the test scripts themselves can now always be kept up-to-date with the latest version of your REST APIs.

Slides: 
PDF icon OSS_EclipseCon-2021_Automated-REST-API-testing_Presentation.pdf
Slides (External URL): 
https://gitlab.com/oss-contrib/EclipseCon2021/slides/-/blob/0d1c72ba8c0c8768ad48…
Objective of the presentation: 
Automatically generate your REST API test scripts, test data, then automatically test OpenAPI-described RESTful microservices with open source tools.
Attendee pre-requisites - If none, enter "N/A": 
Basic knowledge of: RESTful microservices, OpenAPI (Swagger) specification, JavaScript and Jenkins.
Schedule info
Time: 
26 Oct 2021 - 14:30 to 26 Oct 2021 - 15:00
Room: 
Room 1

Comments Sign in to post comments

Michael Siemaszko (Self-employed)'s picture

Example project

Submitted by Michael Siemaszko on Sun, 2021-10-24 18:48

https://gitlab.com/oss-contrib/EclipseCon2021/example-project

  • Log in to post comments
Michael Siemaszko (Self-employed)'s picture

K6 OpenAPI Generator code

Submitted by Michael Siemaszko on Mon, 2021-11-15 14:58

Until merge and release are ready, you can access the K6 OpenAPI Generator code utilized during the presentation at:

  • GitHub: https://github.com/DataInMotion/openapi-generator/ (branch: k6-openapi-extract-examples-enhancements)

  • GitLab (mirror): https://gitlab.com/oss-contrib/EclipseCon2021/openapi-generator/ (branch: k6-openapi-extract-examples-enhancements)

  • Log in to post comments

Elite Sponsors

Premium Sponsors

Basic Sponsors

Eclipse Foundation

  • About Us
  • Contact Us
  • Sponsor
  • Members
  • Governance
  • Code of Conduct
  • Logo and Artwork
  • Board of Directors
  • Careers

Legal

  • Privacy Policy
  • Terms of Use
  • Copyright Agent
  • Eclipse Public License
  • Legal Resources

Useful Links

  • Report a Bug
  • Documentation
  • How to Contribute
  • Mailing Lists
  • Forums
  • Marketplace
EclipseCon is brought to you by The Eclipse Foundation with the support of our sponsors.
Powered by Drupal and built on COD.

Copyright © Eclipse Foundation. All Rights Reserved.

Back to the top