从静止端点开始黄瓜测试

发布于 2025-01-23 11:31:50 字数 390 浏览 1 评论 0原文

我编写了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 :

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满栀 2025-01-30 11:31:50

黄瓜没有这样的层。您必须实施自己的。基本上,您可以采用任何类型的网络框架,例如 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文