cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
Regular Visitor

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

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Regular Contributor

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

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 

View solution in original post

1 REPLY 1
Highlighted
Regular Contributor

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

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 

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Check out this week's challenge!

Create a script to generate an email when an assertion fails for the TechCorner tag!


Scripts created in July:
- A script to change the request body before sending it to the server
Top Kudoed Authors