2023 Interview Tools Postman Interview Questions and Answers

1. Tell me about your understanding of Postman?

Postman is a tool for interface debugging and http interface testing. We can very conveniently use it to simulate get or post or other requests to debug and test the interface.

Advantages of Postman

    •Support various request types: get, post, put, patch, delete, etc.

        •Support online storage of data, data can be migrated through the account •Support use case export, import, batch operation •Very convenient to support the setting of request header and request parameters •Support different authentication mechanisms, including Basic Auth, Digest Auth, OAuth 1.0 , OAuth 2.0, etc. Response data is automatically highlighted according to the syntax format, including HTML, JSON, XML and text

2. Postman, what is the process you use in your work?

    •Create new collection management according to the modules to which interface use cases belong •Write interface test cases under different modules in the collection •Process data association operations between interfaces and add environment variables Use cases or export run through Newman to generate htm reports

3. What features of Postman do you use?

    •Request debugging •Proxy capture •Environment variable setting •Use case import and export •Generate online API documentation •Automated testing •Mock server

4. How to manage the test environment in Postman?

    •Environment on the left toolbar of postman, click the + sign to add a new test environment. Many environment variables can be created in a test environment. With environment variables, these variables can be referenced in the request data. • On the request sending interface, click the "Select Environment" button in the upper right corner to switch the environment you want to use.

5. How does Postman set the association?

    •Extract the required parameters by means of regular expression extraction or json value selection •Set the parameters as global variables •In the following interface, use instead of the { {全局变量}}parameter value to be replaced

6. What are the ways of Postman parameterization?

    •Built-in functions •Pre-scripts to write js scripts •Global variables •Environment variables •Collection variables •CSV, txt text or Json files used in batch execution

7. In Postman, when the environment variable, Collection, and global variable have the same name, which variable will be used first?

    • Environment variables

8. How does Postman implement the interface test assertion, and what method is used

    •Postman mainly writes corresponding assertions in tests •Common assertion methods

// 判断请求返回的状态:
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

// 返回体中是否包含某个字符串
pm.test("Body matches string", function () {
    pm.expect(pm.response.text()).to.include("string_you_want_to_search");
});

// 获取返回体json数据,校验返回内容是否正确
pm.test("Your test name", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.value).to.eql(100);
});

// 响应时间校验
pm.test("Response time is less than 200ms", function () {
    pm.expect(pm.response.responseTime).to.be.below(200);
});

9. How to do Postman custom variables?

• Define variables through JS in Pre-request Script and configure them as global variables, which can be used by all interfaces

10. What built-in variables do you use in Postman?

        •$guid a uuid-v4 style GUID •$timestamp the current UNIX timestamp (in seconds) •$randomUUID a random 36-character UUID •$randomInt a random integer between 1 and 1000 •$randomPassword a random 15 Alphanumeric password of characters • $randomWord Random word • $randomPrice Random price between 100.00 and 999.00 • $randomLoremText Random amount of text

11. Has Postman done continuous integration? How to do?

    •Export Postman scripts, environment variables, global variables, etc. to specified folders •Execute machine configuration Newman execution environment

    • Create a Jenkins task and configure it to run with Newman

The above content is purely personal understanding. If there are any deficiencies, you are welcome to correct me. Please indicate the source for reprinting!

If my blog is helpful to you, if you like my blog content, please "Like", "Comment", "Favorite" with one click!


END Supporting Learning Resources Sharing

Finally:  In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free 【保证100%免费】

加入我的软件测试交流群:110685036免费获取~(同行大佬一起学术交流,每晚都有大佬直播分享技术知识点)

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

How to get it for free:

ââ€â€ââ€â€ââ€â â€â€â€â áÃçÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃæÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃèÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃèÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃèÃÃá

Guess you like

Origin blog.csdn.net/m0_60166861/article/details/131048329