I have the same issue. I have included the full source for the test case, and the dependencies section of the POM.
The issue is that the pom for eviware.soapui does NOT include any of the transitive dependencies for soapui, and as a result, maven does not know which jars to pull down from the repository and include in the classpath.
I've seen other posts on this, so hopefully SmartBear can get a 4.0.2 update out with a corrected pom so we can integrate soapui with junit in a maven project.
Michael
Full Code of test:
/**
* Copyright (c) 2012 Choice Hotels International, Inc.
*
* @author mgiroux
*
* @version $Id: $
*
*/
package com.choicehotels.cis.soapui.guest;
import static org.junit.Assert.fail;
import org.junit.Test;
import com.eviware.soapui.tools.SoapUITestCaseRunner;
/**
*
*/
public class CreateAccountTest {
/**
* Create an account for use in subsequent test cases.
* @throws Exception
*/
@Test
public void createAccount() throws Exception {
SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
runner.setProjectFile("");
runner.run();
}
}
The code resides in a maven project. The dependencies section of the POM.XML follows:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.17.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>eviware</groupId>
<artifactId>soapui</artifactId>
<version>4.0.1</version>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies>