简体   繁体   English

使用 Java 执行 Postman 集合

[英]Executing a Postman collection using Java

In Postman, using Rest, I created a collection of requests that need to be executed.在 Postman 中,使用 Rest,我创建了一个需要执行的请求集合。 I was hoping to link Gherkin acceptance Criteria with the cucumber shell to execute the Postman collection.我希望将 Gherkin 验收标准与黄瓜壳联系起来以执行 Postman 收集。

Is there a way for me, in the cucumber shell, to execute the collection using Java?我有没有办法在黄瓜外壳中使用 Java 执行集合?

Gherkin, Cucumber and Java are all new to me so I apologize if I'm not exactly clear. Gherkin、Cucumber 和 Java 对我来说都是新手,所以如果我不太清楚,我深表歉意。

thanks, Scott谢谢,斯科特

Can you execute the collection of requests using Java?您可以使用 Java 执行请求的集合吗? That is, leaving the Cucumber and Gherkin out of the equation?也就是说,将黄瓜和小黄瓜排除在等式之外? If you can, then you can do it using Cucumber as well.如果可以,那么您也可以使用 Cucumber 来完成。

The execution of steps defined in Gherkin using Cucumber is just a way of executing selected Java methods matching the steps you define in Gherkin.使用 Cucumber 执行 Gherkin 中定义的步骤只是执行与您在 Gherkin 中定义的步骤匹配的选定 Java 方法的一种方式。

This is obviously under the condition that you choose to run Cucumber for Java.这显然是在您选择运行 Cucumber for Java 的情况下。

To get started and have something to build from, clone and run the getting started project offered by the Cucumber team, https://github.com/cucumber/cucumber-java-skeleton要开始并从中构建一些东西,请克隆并运行 Cucumber 团队提供的入门项目, https://github.com/cucumber/cucumber-java-skeleton

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM