EMC_Support
13 years agoContributor
Specifying file locations in JUnit integration
1. How do I, from a JUnit integration set the path where the export files are written to ?
Right now they are being written to the same directory as the project file, and since I am triggering it from maven I'd prefer they would go under target.
A java system property would be preferred but changes to the code would be ok too.
2. How do I set the path to the global settings in this scenario ?
3. Is there a way to set the location of the global-groovy.log ?
My sample integration code:
@BeforeClass
public void beforeClass() throws Exception {
WsdlProject project = new WsdlProject("src/test/resources/my-soapui-project.xml");
project.setPropertyValue("MSA_PORT", System.getProperty("server.port").toString());
suite = project.getTestSuiteByName("TestAcknowledge");
assertNotNull( suite );
}
test
public void testAcknowledgeNotAck() {
TestCase testCase = suite.getTestCaseByName("TestAcknowledgeNotificationUnAcknowledged");
assertNotNull( testCase );
TestRunner runner = testCase.run(new PropertiesMap(),false);
assertEquals( Status.FINISHED, runner.getStatus());
}
Right now they are being written to the same directory as the project file, and since I am triggering it from maven I'd prefer they would go under target.
A java system property would be preferred but changes to the code would be ok too.
2. How do I set the path to the global settings in this scenario ?
3. Is there a way to set the location of the global-groovy.log ?
My sample integration code:
@BeforeClass
public void beforeClass() throws Exception {
WsdlProject project = new WsdlProject("src/test/resources/my-soapui-project.xml");
project.setPropertyValue("MSA_PORT", System.getProperty("server.port").toString());
suite = project.getTestSuiteByName("TestAcknowledge");
assertNotNull( suite );
}
test
public void testAcknowledgeNotAck() {
TestCase testCase = suite.getTestCaseByName("TestAcknowledgeNotificationUnAcknowledged");
assertNotNull( testCase );
TestRunner runner = testCase.run(new PropertiesMap(),false);
assertEquals( Status.FINISHED, runner.getStatus());
}