在过去,对于PHP项目,我将Behat与
api-extension
编写组件级测试。Behat与cucumber有着共同的理念。因此,我想知道在Clojure项目中是否有一个与cucumber相同的api扩展?
这是我想要创建的测试类型:
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)"
}
}
"""