从静止端点开始黄瓜测试
我编写了Cucumber测试,该测试测试了REST API服务层。在应用程序运行和REST端点可用之前,该服务层不可用。这些是系统级测试。黄瓜是否会揭露能够开始测试的休息端点?
我正在尝试实现的流量是:
因此,而不是通过Cucumber Runnerm启动Cucumber测试,通过REST API启动测试。
这是在黄瓜中支持的,还是有其他方法可以揭示休息服务后面的测试?
I've written cucumber tests that test a REST API service layer. The service layer is not available until the app is running and REST endpoints are available. These are system-level tests. Does cucumber expose REST endpoints that enable the tests to be started ?
The flow I'm attempting to implement is :
So instead of starting the cucumber tests via the cucumber runnerm start the tests via a REST API.
Is this supported in cucumber or is there an alternative method of exposing test behind a REST service ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
黄瓜没有这样的层。您必须实施自己的。基本上,您可以采用任何类型的网络框架,例如 spring-boot 或 play Framework 并实现将授权呼叫Cucumber Code的控制器(请参阅如何从其他主要方法调用黄瓜跑步者类)
/43518103/How-to-to-to- to 过于简单。 HTTP服务器通常提供一组并行工人来处理客户端呼叫的库,因此您必须认为算法一般可以确保事物已同步到所需的位置。
Cucumber does not have such a layer. You have to implement your own. Basically you can take any sort of web framework like Spring-Boot or Play framework and implement that controller that would delegate call to Cucumber code (see How to invoke the Cucumber runner class from a different main method)
However you picture seems to be oversimplified. HTTP server normally provides a pool of parallel workers which are to handle client calls so you have to think the algorithm out in general to assure the things are synchronized where they have to be.