hanning
17 years agoNew Contributor
Removing some empty elements while leaving others empty
First off, thank you for a great product!
Now, I have a question regarding data sources and the Remove Empty Content feature. I posted a similar question already but thought the questions were different enough to warrant separate topics. When using an Excel spreadsheet as a data source, is there a way in SoapUI Pro (I'm currently on 2.0) to accomplish the following?
I want to be able to have "empty" cells in my Excel spreadsheet data source, some of which would cause the target elements in the request to be removed and some of which would leave empty target elements in the request.
I'm thinking that I would have to:
1. Fill out to-be-removed elements as empty cells in the spreadsheet
2. Fill out to-be-empty elements with some magic value, say "!EMPTY!"
3. Turn the Remove Empty Content feature off for the request step
4. Write a Groovy script, placed before the request step, that will remove empty elements.
5. Write a Groovy script, placed in between the request step and the above Groovy script, that will replace "!EMPTY!" with a blank string or a null value
Does this sound like something that could work as desired? Is there an easier way, perhaps one already supported? In the little searching I've done so far I haven't stumbled upon a solution, so pardon me if I've missed something obvious.
Now, I have a question regarding data sources and the Remove Empty Content feature. I posted a similar question already but thought the questions were different enough to warrant separate topics. When using an Excel spreadsheet as a data source, is there a way in SoapUI Pro (I'm currently on 2.0) to accomplish the following?
I want to be able to have "empty" cells in my Excel spreadsheet data source, some of which would cause the target elements in the request to be removed and some of which would leave empty target elements in the request.
I'm thinking that I would have to:
1. Fill out to-be-removed elements as empty cells in the spreadsheet
2. Fill out to-be-empty elements with some magic value, say "!EMPTY!"
3. Turn the Remove Empty Content feature off for the request step
4. Write a Groovy script, placed before the request step, that will remove empty elements.
5. Write a Groovy script, placed in between the request step and the above Groovy script, that will replace "!EMPTY!" with a blank string or a null value
Does this sound like something that could work as desired? Is there an easier way, perhaps one already supported? In the little searching I've done so far I haven't stumbled upon a solution, so pardon me if I've missed something obvious.