0

我正在使用 Faker 为我的大部分只读 REST API 播种我的数据。我已经查看了用于测试 API 的 API 蓝图,但是我对如何使用不一致的伪造数据来实现这一点感到困惑。看来您必须为指定的查询定义确切的 json 输出。

关于使用 API Blueprint 和 Faker 的任何提示?

4

1 回答 1

4

API blueprint and Dredd for testing isn't possible use Faker directly.

For describe data you can use JSON schema and define type what you are using.

You can use dredd hooks for pairing incoming data with generated payloads. Dredd have to control structure not values.

If you have some blueprint example and code this will helps.

于 2016-01-27T15:11:50.297 回答