Shifting Left with Postman
Tags: api, postman, devops, tutorial
Published: 2022-08-11 08:10:55

---
title: Shifting Left with Postman
published: true
date: 2022-08-11 7:41:08 UTC
tags: API, Postman, devops, tutorial
canonical_url: https://blog.postman.com/shifting-left-with-postman/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zt75cn9k53lppaae5vcv.png
---
This article was written by [Jordan Walsh](https://blog.postman.com/author/jordan-walsh/).

Successful organizations today understand that when quality-focused activities are started early in software development projects, it leads to significant benefits—not only in reducing the number of defects deployed to production systems, but also in customer satisfaction and overall team morale.

This idea, known as “shifting left,” has been around for many years. Still, many organizations remain hesitant to embrace the idea, either because the benefits are not understood well or because it’s seen as too difficult to change current processes.

While technology teams implement the shift-left approach, it requires support from management to allow teams the flexibility to move into this way of operating. Management must be prepared to allow development and quality-focused teams the space to make mistakes and potentially procure necessary tools and software to support them on this journey.

Today, Postman is the world’s leading [API platform](https://blog.postman.com/new-postman-api-platform-redefining-api-management-for-api-first-world/) helping more than [20 million registered developers](https://blog.postman.com/celebrating-20-million-postman-users/) with their API lifecycle needs. Organizations using Postman to shift left their development and testing practices are seeing amazing benefits, including:

- Increased efficiency in the development and testing processes
- Increased NPS score from user feedback and surveys
- Increased performance of their applications
- Reduction in software defects being raised during actual testing cycles
- Reduction in security vulnerabilities
- Reduction in time to ship products

## 4 ways Postman helps you shift left

Here are four ways you can use the Postman API Platform to get started with shifting left your development and quality practices:

### 1. Authoring API specifications in Postman

Postman’s [API Builder](https://learning.postman.com/docs/designing-and-developing-your-api/the-api-workflow/) provides developers a great interface for managing and maintaining API specifications. Specifications can be developed directly in Postman, imported from JSON/YAML files, or synchronized from Git code storage systems.

Along with integrated error detection, Postman’s API Builder provides intelligent security warnings to inform API designers during design time of any security flaws that are detected in API specifications—even on specs developed in other tools. Having these picked up during design time drastically reduces the impact these types of errors can cause when they make their way into production.

![Authoring API definitions in Postman’s API BuilderAuthoring API definitions in Postman’s API Builder](https://blog.postman.com/wp-content/uploads/2022/08/shift-left-0-1000x583.png)
_Authoring API definitions in Postman’s API Builder_

#### Postman’s API Builder helps developers:

- Store and manage design assets for APIs
- Find errors in API specifications early
- Be warned about security issues and provides appropriate advice on correction

API specifications that are available in Postman form the starting point for a structured API-first lifecycle through generation of Postman Collections for different use cases.

### 2. Generating mock servers with customizable examples

Mock servers are a very useful way for developers and quality teams to do shift-left testing of their applications. With a few clicks, a mock server can be created that mimics the behavior of the API, simulating sample responses in both success and error conditions.

![Mock server example responses generated instantly in Postman](https://blog.postman.com/wp-content/uploads/2022/08/shift-left-1-1000x573.png)
_Mock server example responses generated instantly in Postman_

When used as part of a development lifecycle, the generated examples can be leveraged by user interface developers to provide data that will be displayed within their applications. On top of this, Postman provides the ability to update the example content almost instantly without any deployment. This rapid development approach allows teams to quickly understand the effect on the UI when different circumstances occur (e.g., large datasets, no data returned, error conditions, and more).

#### Postman’s mock servers help developers:

- Mimic the behavior of an API without writing any code
- Generate customizable examples that can be used in other parts of the application

Mock servers form a key part of shifting the quality left when writing API-driven applications.

### 3. Collaboration on test cases between developers and quality teams

With the addition of mock servers into the development lifecycle, quality teams can begin writing their test cases immediately, removing any dependency on the development teams to complete the build of their code.

Postman provides a collaborative space to create and house these tests, giving them context by aligning them to specific APIs and requests, and at the same time allowing development teams to watch the progress of the tests and use Postman to execute these test cases directly on their local development servers. Developers can then comment and provide feedback on the test cases in real time, ensuring a dialogue between the teams.

![Simplifying creating and collaborating on tests in Postman](https://blog.postman.com/wp-content/uploads/2022/08/shift-left-2.png)
_Simplifying creating and collaborating on tests in Postman_

Using Postman environments, the quality team can write all necessary test cases and run these against mock servers. Once the code has been built and delivered into a shared QA server, a new Postman environment can be created to point the test cases to this new server and execute them there.

Giving quality teams the ability to quickly switch test cases between mock servers and live servers ensures that they are able to identify differences quickly and call out where there might be defects in the code. Giving developers access to these tests while they are being written will enable both the developers and quality teams the ability to discuss and determine if the tests are being written in the most efficient and effective way.

![Creating and updating environments in Postman](https://blog.postman.com/wp-content/uploads/2022/08/shift-left-3-1000x348.png)
_Creating and updating environments in Postman_

#### Postman’s collaboration tooling helps developers:

- Start writing test cases early to speed up the quality cycles on code
- Collaborate on tests and ensure they are being written effectively
- Test the same thing against many different environments (from local to production)

### 4. Monitor-driven API tests with data visibility

Once quality teams write tests, it is common for these tests to be shelved until the next regression testing cycle, with development and quality teams moving on to the next release.

The challenge with this approach is that any bugs that make their way into the production environment are often identified by customers through support tickets, resulting in a poor customer experience, and development cycles being interrupted by bug fixes.

With Postman, the tests that were written can be linked to a [Postman monitor](https://learning.postman.com/docs/monitoring-your-api/intro-monitors/) and be executed on a regular basis, with test results synchronized into operational monitoring systems (such as [DataDog](https://blog.postman.com/how-to-monitor-apis-using-postman-and-datadog/) or [PagerDuty](https://learning.postman.com/docs/integrations/available-integrations/pagerduty/)).

![Viewing monitoring results and connecting APM systems in Postman](https://blog.postman.com/wp-content/uploads/2022/08/shift-left-4.png)
_Viewing monitoring results and connecting APM systems in Postman_

This is a continuation of shifting quality left, as you are continuing to ask your quality team to make sure that not only the quality of what is being built is at a high standard, but also what has been built before. By reusing the tests from the previous releases, your quality teams can have confidence that the quality of deployed code remains high, and any defects that are released are known before your customers see them.

#### Postman’s monitoring tooling helps developers:

- Use existing tests to run on a schedule against deployed systems
- Identify issues before customers find them, resulting in a better customer experience
- Have confidence in the quality of deployed code

## Conclusion

Shifting left is a concept that can be applied to improve the quality of not just technical applications, but also the way that services and user interfaces are designed. It is the idea of moving the actual building of systems as far right as possible in order to spend more time on design and quality-focused initiatives.

Taking part in a shift-left movement of quality is not the responsibility of just the quality team or the development team. This requires an investment from everyone in the development lifecycle, from management all the way down.

The investment in this approach may take some time to prove results, but it is likely to yield quality improvements in products, better customer experience, and an overall improvement in employee morale as there will be less time in maintaining defective code and more time in the development of new features.

As described above, the Postman API Platform provides a range of features and functions that can assist development and quality teams on shifting testing processes left, including API Builder tooling, mock servers, collaboration, and automated test-driven monitors. Postman allows teams to get started with very little friction and achieve a massive boost to productivity and quality.

The post [Shifting Left with Postman](https://blog.postman.com/shifting-left-with-postman/) was written by Jordan Walsh and appeared first on [Postman Blog](https://blog.postman.com).