Add Test Step to test Case Wald project
Hello,
I am trying to add a test step to a test case and i dont have a clue on how to build a RestRequest.
Here is what i am trying to do :
SoapUI.setSoapUICore(new StandaloneSoapUICore(true));
WsdlProject wadlProject = new WsdlProject();
RestService service = ( RestService )wadlProject.addNewInterface( "MyProjectName", RestServiceFactory.REST_TYPE );
WadlImporter importer = new WadlImporter( service );
importer.initFromWadl("Url to WALD");
wadlProject.setName("Name of Project");
WsdlTestSuite ts = wadlProject.addNewTestSuite("SuiteName");
WsdlTestCase tc = ts.addNewTestCase("TestCaseName");
//PROBLEMS BEGIN HERE
//----------------*****************-----------------
tc.addTestStep("httprequest", "StepName");
//----------------*****************-----------------
wadlProject.saveIn(projectFile); /* The save works fine */
This gives me this error :
java.lang.NullPointerException
at com.eviware.x.form.XFormFactory.createDialogBuilder(XFormFactory.java:23)
at com.eviware.x.form.support.ADialogBuilder.buildDialog(ADialogBuilder.java:70)
at com.eviware.x.form.support.ADialogBuilder.buildDialog(ADialogBuilder.java:53)
at com.eviware.soapui.impl.wsdl.teststeps.registry.HttpRequestStepFactory.buildDialog(HttpRequestStepFactory.java:163)
at com.eviware.soapui.impl.wsdl.teststeps.registry.HttpRequestStepFactory.createNewTestStep(HttpRequestStepFactory.java:80)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.addTestStep(WsdlTestCase.java:449)
at soapui.publisher.SoapUIPublisher.soapTest(SoapUIPublisher.java:106)
at soapui.publisher.SoapUIPublisher.publish(SoapUIPublisher.java:72)
at com.smartesting.publisher.api.startup.PicoPublisherProgram.doRun(SourceFile:22)
at com.smartesting.publisher.api.startup.AbstractPublisherProgram.run(SourceFile:60)
at soapui.publisher.SoapUIPublisherProgram.main(SoapUIPublisherProgram.java:48)
What i want to do is to create a rest DELETE/POST/GET in the steps with data when needed. How do i acheive that?
Please help me i cant find any help anywhere...