Ask a Question

missing package org.apache.xmlbeans when running a Test Case from java

rah
Occasional Contributor

missing package org.apache.xmlbeans when running a Test Case from java

I am trying to start to run a TestCase from java more or less like this

try {
WsdlProject project = new WsdlProject(testxml);
TestSuite testSuite = project.getTestSuiteByName(suitename);
TestCase testCase = testSuite.getTestCaseByName(testcase);

// create empty properties and run synchronously
TestRunner runner = testCase.run(new PropertiesMap(), false);
Assert.assertEquals(Status.FINISHED, runner.getStatus());

}
catch (XmlException e) {
Assert.fail("Could not start soapui");
}
catch (IOException e) {
Assert.fail("Could not start soapui");
}
catch (SoapUIException e) {
Assert.fail("Could not start soapui");
}

But I keep getting the following Exception: package org.apache.xmlbeans does not exist
    [javac] import org.apache.xmlbeans.XmlException;

what am I missing in my class path?
1 REPLY 1

Re: missing package org.apache.xmlbeans when running a Test Case from java

Hi,

Do you have the xmlpublic and xbean jars on the classpath? Really depending on what type of TestSteps you are using in your TestCase, you may need a lot of other dependencies as well so you might as well include everything in the soapUI libs folder.

Regards,
Dain
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: