Automating API Testing with webMethods API Management and Postman
Tags: api, management, postman, webmethods
Published: 2022-11-15 13:27:50

---
title: Automating API Testing with webMethods API Management and Postman
published: true
date: 2022-08-29 11:47:26 UTC
tags: api, management, postman, webmethods
canonical_url: https://tech.forums.softwareag.com/t/automating-api-testing-with-webmethods-api-management-and-postman/260727
---

![07](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/a/ba8923d22441f354d4b3311c28f06eae5f3a6f71.jpeg)

According to a recent [Nordic APIs statistics roundup](https://nordicapis.com/20-impressive-api-economy-statistics/), over 90% of developers are using APIs, and they spend nearly 30% of their time coding APIs. This clearly illustrates how important APIs have become for businesses but also how much impact they have on the workload of IT professionals. Many of those professionals will be familiar with [Postman’s](https://www.postman.com) API Testing platform. They use it either to discover how third-party APIs work or to test the API they are developing themselves.

In this post, I will dig into some of the API Testing features that Postman offers and how you can use them in your API development process with webMethods API Management.

If you do not feel like reading, here is a [demonstration](https://youtu.be/RSpyqyZRGT8).

# Where do API Testing tools fit in?

This post is part of a series of technical posts that I announced in [New API tools are transforming API Management](https://blog.softwareag.com/api-management-tools/). In that introduction, I used this simple representation of the API life cycle.

![api_lifecycle_stages_iterative](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/a/9a751f713a21fd442e4b6dfb2f23736d1304845a.png)

Looking at this simple representation, you would - logically - assume that API Testing fits into the testing phase of the lifecycle. However, in today’s modern software development processes, testing is no longer isolated to the validation of software that was written or changed. Test cases are used as design specifications, logic validation and even documentation.

The API life cycle is a high-level abstraction of the actual delivery process for APIs. Ultimately APIs are software, and our industry has well-established practices like DevOps and CI/CD for software delivery. The next diagram illustrates how the API life cycle can be mapped to different stakeholders.

[![api_lifecycle_stakeholders](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/8/78e8263a49ddbaa64933680f75ff39b7fa00e973_2_517x229.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/7/8/78e8263a49ddbaa64933680f75ff39b7fa00e973.png "api\_lifecycle\_stakeholders")

It is safe to say that API Testing tools can deliver value at all stages and for all stakeholders. The API Product Manager will specify expected behavior with test cases. The developer will validate business logic with those same test cases. The API consumer uses those same test cases - provided as part of the API documentation - to discover how the API works and behave. Test cases are used at different stage of the lifecycle in different ways, which is why it is so important to automate testing within your CICD pipeline.

# Automating API Testing with Postman

It is not my intent to explain how to use Postman in this post. You can find plenty of information on that on their website. I will explain how you can use both Postman and webMethods API Management together in an automated CICD pipeline. I will use [GitHub Actions for implementing the pipeline](https://tech.forums.softwareag.com/t/using-github-actions-with-webmethods-api-gateway/257584).

[Postman Collections](https://www.postman.com/collection/) provide a mechanism for organizing and collaborating on API test cases. They can be used as the vehicle for sharing test cases across all stages of the API lifecycle. Collections can also be used for automating API tests using Postman’s [Newman](https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/#:~:text=Newman%20is%20a%20command%2Dline,integration%20servers%20and%20build%20systems.) command-line tool, which can easily be integrated into the GitHub Actions pipeline.

In this [demonstration](https://www.youtube.com), I will show you:

1. How you can use Postman Collections manually.
2. How you can execute Postman Collections from within your CICD pipeline.
3. How you can inspect the outcomes of the tests that were performed as part of your CICD pipeline.

[![Screenshot 2022-08-29 134627](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/c/2cc3095de015e150d2f85c140b7332a9281f172d.jpeg)](https://youtu.be/RSpyqyZRGT8)

## What’s next?

If you’d like to learn more about the Postman platform, you can create a free account and try it out.

If you’d like to learn more about CICD with GitHub Actions for webMethods API Management, check out [this article](https://tech.forums.softwareag.com/t/using-github-actions-with-webmethods-api-gateway/257584).

[Read full topic](https://tech.forums.softwareag.com/t/automating-api-testing-with-webmethods-api-management-and-postman/260727)