Home >Development Tools >phpstorm >Postman interface debugging tool shares data

Postman interface debugging tool shares data

咔咔
咔咔Original
2021-01-22 10:38:252156browse

I’m still worried about how to share data between interface testing tools instead of writing the interface again.

Preface

The previous interface tests used postman, and will be adjusted to Talend Api Tester recently.

So there is a big problem. All interface information is on postman, how to import it into alend Api.

Postman interface debugging tool shares data
It’s a big problem, old iron

Following this question, let’s discover a new world in testing tools.

1. Start from the beginning

Since you want to have a new understanding of testing tools, you should start from the beginning .

For the convenience of testing, Kaka first creates a collection as A

Postman interface debugging tool shares data
api collection

and then adds a new request to collection A. , the picture below is the picture of successful addition

Postman interface debugging tool shares data
A new request

A big disadvantage of such a request is that when the domain name changes, all interfaces in this set need to modify the request domain name.

Postman has already prepared for this demand.

Postman interface debugging tool shares data
Add environment variables

After the addition is successful, you can see the environment variables just added here

Postman interface debugging tool shares data
Environment variables

Then change the domain name just requested to {{host}}. You can still get the data by sending the request.

Postman interface debugging tool shares data
Modify the request initiated by the host

After completing the above operations, we have almost created a complete collection. Next, we will Need to get back to the point.

Continue to convert interface data to each other mentioned at the beginning of the article.

2. Postman and Postman exchange data

In fact, there are several ways to import data into each other in Postman .

Here Kaka will introduce two methods to you, the first is to share the link, and the second is to export it as a json file.

Both methods can import interface data into another postman.

You can also import data into other interface testing tools that support Postman Collection.

First of all, let’s talk about how postman works together and uses shared links.

Assume that Xiao Q has finished writing part of the interface data and has already written it in postman. Debugged.

Unfortunately, some adjustments need to be made due to work reasons, so Xiao Q needs to give the written interface data to the recipient.

The most direct way at this time is for Xiao Q to give his postman account to the person who takes over, but this is not very realistic!

So Xiao Q was wondering if there was a way to solve this problem.

Postman interface debugging tool shares data
Thinking

In fact, postman has already had this function in this situation, but in the usual development process, it only focuses on its own one-third of the land.

As long as the interface I debug can run smoothly, you can use the other functions as awesome as you like.

When you right-click a collection, you will find that the shared collection is in the column

Postman interface debugging tool shares data
Share the collection

Then click to get the public Link

Postman interface debugging tool shares data
Get public link

When you click Get public link, a link address will appear

Postman interface debugging tool shares data
Obtained link address

After obtaining this link address, you can send this address to your friends, and then your friends can take it Copy this address directly to this collection in your own postman

Postman interface debugging tool shares data
Click import

Then you can put the address you just copied here. That’s it

Postman interface debugging tool shares data
Import other postman’s collections

Since Kaka directly imported it in its own postman, it will appear that the collection already exists, or Select Replace, or select a copy

Postman interface debugging tool shares data
Import collection
Postman interface debugging tool shares data
Just select

Above It’s about the data exchange between postman and postman.

##3. Postman and Talend Api exchange data

First of all, you need to install the Talend Api extension. Because of this The extension is downloaded from Google Play Store.

Then there must be some people who can’t download it. Everyone who understands understands it, but just skip it if they don’t.

Kaka gives you an address where you can download the Google plug-in offlinecrxdl.com

Postman interface debugging tool shares data##Install the plug-in
As for downloading How to install the plug-in? Just search it yourself! It's very simple, just drag the compressed package directly into the extension.

The picture below is the screenshot of Kaka installed

Postman interface debugging tool shares dataThe screenshot of the installation
If we need to exchange data, then we can only Find information about Postman in the

Talend Api extension.

When you click Import in the Talend Api extension, you will find that the first one is to import the Postman collection V2.

Then there is no need to think about it. This entrance is for Postman users to use directly.

Postman interface debugging tool shares dataImport information
Then go to Postman and right-click the collection to see the export button.

Postman interface debugging tool shares dataExport
Then you will see a familiar figure, this collection V2

Postman interface debugging tool shares data版本
Export version

Then click export directly! Then try to import the exported file to Talend Api.

At this point you can see the collection and method we just created in Postman in Talend Api.

Postman interface debugging tool shares data
After import

But you will find that the request at this time is blocked. That is because Talend Api still has not been recognized. If you set the environment variable in Postmanhost

, then you need to set the environment variable of host in Talend Api. Copy the value just set in Postman. come over.

设置Postman interface debugging tool shares data
Set the environment variable

Then initiate the request, and you will see that it has been returned successfully

Postman interface debugging tool shares data
Initiate a request

4. Summary

The main introduction of this article Enables data exchange between Postman and Postman, and between Postman and Talend Api.

I have never used other interface testing tools Kaka. Most of them should support such operations. If you ask more questions during use, you will find a lot of new things.

If you cannot use this function temporarily, then first know that this thing exists. If you need it later, at least have this impression in your mind and know that such a thing exists.

Instead of picking up the keyboard and just doing it, it is a waste of time and energy, and may make mistakes.

Persistence in learning, persistence in blogging, and persistence in sharing are the beliefs that Kaka has always upheld since his career. I hope that Kaka’s articles in the huge Internet can bring you a little Silk help. My name is Kaka, see you next time.

The above is the detailed content of Postman interface debugging tool shares data. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn