soapUI和JUnit依赖关系问题 [英] soapUI and JUnit dependency issue
问题描述
我正在尝试使用集成到JUnit的soapUI.我已尝试添加提到的依赖项,如此处,但它不起作用.找不到某些类.
I'm trying to use soapUI integrated to JUnit. I've tried to add the dependencies as mentioned here but it doesn't work. Some classes are not found.
在此帖子中,建议将soapui/lib目录添加到类路径中但这对Maven来说并不是一个好习惯.
In this post, it is proposed to add the soapui/lib directory to the classpath but this is not really a good practice with Maven.
您是否知道要添加到我的项目中以便将soapUI集成到JUnit的依赖项?
Do you know which dependency(ies) to add to my project in order to integrate soapUI to JUnit?
谢谢
推荐答案
根据您要使用SoapUI进行的操作,您也许可以使用其Maven插件,而不是尝试将其与JUnit集成: http://www.soapui.org/Test-Automation/maven-2x.html .您可以使用它来例如启动SoapUI模拟服务器,运行调用Web服务的集成测试,然后在测试完成后停止模拟服务器.如果要执行此操作,另请参见故障保护插件.
Depending on what you're trying to do with SoapUI, you may be able to use its Maven plugin, rather than try to integrate it with JUnit: http://www.soapui.org/Test-Automation/maven-2x.html. You can use this to e.g. start a SoapUI mock server, run integration tests that call a web service, then stop the mock server upon completion of the tests. See also the Failsafe plugin if you want to do this.
如果失败,则可以将Maven插件添加到测试类路径中.这也应该提取运行SoapUI本身所需的所有依赖项:
Failing that, you could add the Maven plugin to your test classpath. This should also pull in all of the dependencies required to run SoapUI itself:
<dependencies>
<dependency>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>eviware</id>
<url>http://www.eviware.com/repository/maven2/</url>
</repository>
</repositories>
这篇关于soapUI和JUnit依赖关系问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!