简体   繁体   English

使用Gherkin / Java和IntelliJ IDEA测试API

[英]Testing APIs with Gherkin/Java and IntelliJ IDEA

I have been asked to create some automation tests to test an API for a project. 我被要求创建一些自动化测试来测试项目的API。 I am fairly new to automation testing with limited knowledge of java. 我对Java知识有限的自动化测试相当陌生。 The instructions I have been given include; 我得到的指示包括: create a BDD style test suite using cucumber/gherkin syntax, utilizing Apache fluent-hc to interrogate the API. 创建一个使用Cucumber / Gerkin语法的BDD样式测试套件,并利用Apache fluent-hc询问该API。 I have also been asked to create the test suite using Java. 我还被要求使用Java创建测试套件。 How can I utilize 'Apache fluent-hc' to test my API and can this be done via a Java IDE like 'IntelliJ IDEA'? 如何使用“ Apache fluent-hc”来测试我的API,并且可以通过“ IntelliJ IDEA”之类的Java IDE来完成? Thanks 谢谢

That's indeed a very general question. 这确实是一个非常普遍的问题。 I can just say in really short "yes you can use IntelliJ IDEA" for all Java related development. 我可以说很短,“是的,您可以使用IntelliJ IDEA”进行所有与Java相关的开发。

From the other point, it is something that you have to learn and understand your own, before starting any development, as a sample, in which way your BDD tests will be developed based on the API technology and as you said that you have limited knowledge of Java I would suggest you read first how to create API in Java, of course, it all based on your requirements, but I prefer API development using Spring Boot . 另一方面,在开始任何开发之前,您必须学习并了解自己的知识作为样本,以这种方式,将基于API技术来开发BDD测试,并且正如您所说的那样,您的知识有限Java的作者,我建议您首先阅读如何在Java中创建API,当然,所有这些过程都是基于您的要求的,但是我更喜欢使用Spring Boot进行 API开发。

And if you are interested in that, I will post my blog post URL here later on where I'm describing from 0 to end how to cover APIs with BDD (currently it is under preparation, next week I will post it). 如果您对此感兴趣,我将稍后在这里发布我的博客文章URL,从0到结束描述如何使用BDD覆盖API(目前正在准备中,下周将发布它)。

Meanwhile, I will suggest you read this blog and earn some knowledge of APIs and their testing. 同时,我建议您阅读博客并获得一些API及其测试知识。

UPDATE: Here is the blog post about BDD that I promised - https://www.blazemeter.com/blog/api-testing-with-cucumber-bdd-configuration-tips 更新:这是我承诺的有关BDD的博客文章-https: //www.blazemeter.com/blog/api-testing-with-cucumber-bdd-configuration-tips

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

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