cancel
Showing results for 
Search instead for 
Did you mean: 

Is it a SoapUI feature to remove any headers from existing tests when generating a test suite?

Occasional Visitor

Is it a SoapUI feature to remove any headers from existing tests when generating a test suite?

After generating 4 test suites with total of 26 tests from existing tests had to go back and add the header in each of the 26 tests. Not sure why removing the header would be a feature. Made for extra work. Would be a real pain if had hundreds of tests. Seems would be better to at least have an option to keep the header. Didnt see anything obvious. Used the Generate TestSuite on the PortBinding Interface object.

 

Thanks, Mike

Tags (1)
2 REPLIES 2
Community Hero

Re: Is it a SoapUI feature to remove any headers from existing tests when generating a test suite?

Unclear question.

Why type of steps are being used?
Currently, are those headers being created automatically?


Regards,
Rao.
Frequent Contributor

Re: Is it a SoapUI feature to remove any headers from existing tests when generating a test suite?

If a header is included in the definition of the Request of the API then it will be included in the generated tests, add the header via the request editor, it is the second tab along the bottom of the editor.

 

If you have a large number of generated tests without this, you could use a Groovy script to add it to existing tests.

 

Take a look at my refactoring/meta-programming post from last week,

https://community.smartbear.com/t5/SoapUI-Open-Source/Let-s-talk-Meta-Programming-in-SOAPUI/m-p/1820... 

 

Replace the part that adds assertion with a call to 

setRequestHeaders(...)

https://support.smartbear.com/readyapi/apidocs/soapui/com/eviware/soapui/impl/support/AbstractHttpRe...

 

 

New Here?
Join us and watch the welcome video:
Final Interview in the Series
API_testing_mistake#7
Top Kudoed Authors
Top Kudoed Posts