Forum Discussion

hledbetter's avatar
hledbetter
Regular Visitor
9 years ago

In ReadyAPI, how do you set default value to true for Remove Empty Content?

  • kondasamy's avatar
    9 years ago

    We expect your problem to be described clearly to get it solved. Also, this should actually go to Ready API - SoapUI NG forum and should not fall under "Feedbacks and Suggestions".

     

    However, value for "Remove Empty Content" property is by default 'false'. But this can be tweaked through a single Groovy Script,

     

    for( testSuite in testRunner.testCase.testSuite.project.getTestSuiteList() ) 
    {
    	for( testCase in testSuite.getTestCaseList() ) 
    	{    
    		for( testStep in testCase.getTestStepList() ) 
    		{
    			if( testStep instanceof com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep ) 
    			{
    
    				testStep.getTestRequest().setRemoveEmptyContent(true)
              
                }
    		}
    	}
    }

    Thanks,

    Kondasamy