Forum Discussion

davidfmartin's avatar
davidfmartin
Occasional Visitor
7 years ago

Trouble with SoapUITestCaseRunner

I am getting the following error when running 

SoapUITestCaseRunner using a Junit test

 

Error is:

 

java.lang.NoSuchMethodError: org.apache.log4j.ConsoleAppender.setWriter(Ljava/io/Writer;)V

at com.eviware.soapui.tools.AbstractSoapUIRunner.ensureConsoleAppenderIsDefined(AbstractSoapUIRunner.java:98)

at com.eviware.soapui.tools.AbstractSoapUIRunner.initGroovyLog(AbstractSoapUIRunner.java:79)

at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:335)

at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:204)

 

My test:

 

@RunWith(SpringRunner.class)

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)

@ContextConfiguration(classes=JaxrsApplication.class)

public class SoapUITester {

 

test

public void testRunner() throws Exception

{

  SoapUITestCaseRunner runner = new SoapUITestCaseRunner();

  runner.setProjectFile( "src/test/soapui/CenterService-soapui-project.xml" );

  runner.run();

}

}

 

Anyone know how to solve this?

 

I am using spring-boot 1.5.2, Java 8.

 

Thank you.

1 Reply

  • jashadip's avatar
    jashadip
    New Contributor

    Did you try importing the jars from SOAPUI lib folder?

     

    I was facing a similar issue, where i had added a maven dependency for only soapui. When I ran my junit tests it an returned an error similar to yours. Went through the smartbear junit-soap intergration page and  added all the soapui jars present in the "lib" folder to my project and now it is successfully executing the junit tests.

     

    You can find the documentation for it here.

     

    Excerpt : "Copy all the jar files from the lib folder for SoapUI Pro Installation folder in class file path. Copy the soapui-pro-5.0.0.jar (or corresponding version) from the bin folder in SoapUI Pro intallation directory."