gpt4 book ai didi

testing - 如何为 dropwizard 编写集成测试

转载 作者:行者123 更新时间:2023-11-28 20:06:24 25 4
gpt4 key购买 nike

我正在使用 dropwizard 开发应用程序,我需要使用 stub 启动我的应用程序并运行一些集成测试。

有人知道相同的测试框架吗?

最佳答案

显然可以使用 DropwizardServiceRule 来完成

DropwizardServiceRule<ServerConfiguration> server = new DropwizardServiceRule<ServerConfiguration>(Main.class, this.getClass().getResource("/config-samples/test-integration-server-config.yml").getPath())

server.startIfRequired()

关于testing - 如何为 dropwizard 编写集成测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17662528/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com