5

Problem of dependence with youth and JUnit

 3 years ago
source link: https://www.codesd.com/item/problem-of-dependence-with-youth-and-junit.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Problem of dependence with youth and JUnit

advertisements

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.

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.

Do you know which dependency(ies) to add to my project in order to integrate soapUI to JUnit?

Thanks


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.

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>


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK