Forum Discussion
- steveKubikOccasional Contributor
Hi,
I am looking for help to create Test Case in SOAP UI from Eclipse. Would you please give some sample code .
Thanks
Steve
- punterContributor
Hi Steve,
With below code created in junit i am abe to create test case.
But do not know why tes case are not reflecting in soap gui?
import com.eviware.soapui.model.workspace.Workspace;
import com.eviware.soapui.support.SoapUIException;
import com.eviware.soapui.support.action.SoapUIAction;
import com.eviware.soapui.model.project.ProjectFactoryRegistry;
import org.apache.xmlbeans.*;
public class Helloo extends javafx.application.Application
{
@SuppressWarnings({ "unchecked", "deprecation" })
test
public void testSoapUI() throws IOException, InterruptedException {System.out.println("Hello Wrld");
try {WsdlProject project = new WsdlProject();
boolean createRequests = true;
project.importWsdl("http://api.bing.net/search.wsdl", createRequests);
project.setName("p");
System.out.println(""+project.getPath());
WsdlInterface[] inter = WsdlInterfaceFactory.importWsdl(project, "http://api.bing.net/search.wsdl", true);
project.addNewTestSuite("ram").addNewTestCase("case1");
TestSuite testSuite = project.getTestSuiteByName( "ram" );
TestCase testCase = testSuite.getTestCaseByName( "case1" );
TestRunner runner = testCase.run( new PropertiesMap(), false );
} catch (Exception e) {
e.printStackTrace();
}
}@Override
public void start(Stage primaryStage) throws Exception {
// TODO Auto-generated method stub
}}
- punterContributor
Hello ,is there any one who can help me in achieving the above scenario discussed?
Related Content
- 4 years ago