Behat 的 Clojure 版本?

Clojure version of Behat?

过去,对于 PHP 项目,我使用 Behat 结合 api-extension 编写组件级测试。 Behat 与 Cucumber 有着共同的理念。因此,我想知道是否有等效的 api 扩展可以用于 Clojure 项目中的黄瓜?

这是我想要创建的测试类型:

Feature: MyFeature
Scenario: do somthing
      Given the request body is:
      """
      {
        "key": "val"
      }
      """
      And the "Content-Type" request header is "application/json"
      When I request "/route" using HTTP POST
      Then the response code is 200
      Then the response body contains JSON:
      """
      {
          "meta": {
              "status": "@variableType(string)"
          },
          "data": {
              "key": "@variableType(integer)"
          }
      }
      """

所以我 认为 您正在寻找的是以某种方式实现 Gherkin 的 BDD 框架(就像 Behat 所做的那样)。您提到的 Cucumber 框架就是这样做的,并且存在一个 Clojure 实现,您可以在此处看到:https://github.com/cucumber/cucumber-jvm-clojure

我想这基本上就是您要找的。