Loading...
Loading...
Compare original and translation side by side
api-testingprompts/api-testing_EN.mdapi-testingprompts/api-testing_EN.mdprompts/api-testing_EN.mdprompts/api-testing_EN.mdoutput-formats.mdexamples/postman-rest-api/cd examples/postman-rest-api
npm install -g newman
./newman-run.shexamples/postman-rest-api/cd examples/postman-rest-api
npm install -g newman
./newman-run.shexamples/rest-assured-java/examples/rest-assured-java/examples/supertest-nodejs/examples/supertest-nodejs/| Tool | Use Case | Advantages |
|---|---|---|
| Postman/Newman | REST API testing | Easy to use, visual, CI/CD integration |
| REST Assured | Java projects | Strong typing, BDD style |
| Pytest + Requests | Python projects | Flexible, rich ecosystem |
| SuperTest | Node.js projects | Good integration with Express |
| GraphQL Playground | GraphQL API | Designed specifically for GraphQL |
| 工具 | 适用场景 | 优势 |
|---|---|---|
| Postman/Newman | REST API测试 | 易于使用、可视化、支持CI/CD集成 |
| REST Assured | Java项目 | 强类型、BDD风格 |
| Pytest + Requests | Python项目 | 灵活、生态丰富 |
| SuperTest | Node.js项目 | 与Express框架集成良好 |
| GraphQL Playground | GraphQL API | 专为GraphQL设计 |
newman: command not foundundefinednewman: command not foundundefinedundefinedundefined{{variable}}-enewman run collection.json -e environment.json{{variable}}-enewman run collection.json -e environment.jsonSSL certificate problemundefinedSSL certificate problemundefinedundefinedundefinedError: ETIMEDOUTError: ESOCKETTIMEDOUTundefinedError: ETIMEDOUTError: ESOCKETTIMEDOUTundefinedundefinedundefinedpm.response.json()// Add debug info in Tests
console.log(pm.response.json());pm.response.json()// 在Tests中添加调试信息
console.log(pm.response.json());// Save data in first request's Tests
pm.environment.set("userId", pm.response.json().id);
// Use in subsequent requests
// URL: {{baseUrl}}/users/{{userId}}// 在第一个请求的Tests中保存数据
pm.environment.set("userId", pm.response.json().id);
// 在后续请求中使用
// URL: {{baseUrl}}/users/{{userId}}--delay-request 200--bail--delay-request 200--bail