加载Wiremock存根文件 [英] Load wiremock stub files

查看:71
本文介绍了加载Wiremock存根文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在启动我的cumul-jvm测试之前加载所有的Wiremock存根文件.

I wanted to load all my wiremock stub files before start-up my cucumber-jvm tests.

根据Wiremock通过API docs 只能推送一个文件.不批量.我当时想在启动测试之前在测试项目中使用Java代码.

As per wiremock docs via API only one file can be pushed. Not bulk. I was think using java code within the test project before kick-off tests.

通过代码执行此操作的最佳方法是什么.

Whats would be the best way of doing this through the code.

推荐答案

通过调用Wiremock api,您可以按照以下解决方案一次性上传多个存根.

By calling wiremock api you can upload multiple stubs in one go as per below solution.

解决方案

尝试将其发布到 http://localhost:8080/__ admin/mappings/import

这篇关于加载Wiremock存根文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆