cancel
Showing results for 
Search instead for 
Did you mean: 

input multiple entries using a text file

luke_devon
Occasional Visitor

input multiple entries using a text file

Hi , 

 

I use spml to execute some commands using soap UI. I have a modify request which should be executed for around 100 entries. Can I keep these entries (for example mobile numbers) in a text file and call that txt file using the spml? 

Then the same commands will execute for all the 100 mobile numbers.

Please send me a little guide.

 

Thanks

Luke

1 REPLY 1
richie
Community Hero

Re: input multiple entries using a text file

Hey @luke_devon,

I dont know what spml is,but if you need to execute a request multiple times by sourcing request testdata from multiple files (or multiple values from a single file) for eacj iteration and then loop round to next file for next test? Yep,thats totally do-able.

SmartBear call this "data driven" functionality and the licensed version of soapui (called readyapi!) comes with some native functionality built in to do all the heavy lifting for you. The open source soapui doesnt come with that functionality built in, so you need a bit of groovy scripting to do it.


If you google variations of "data driven groovy script soapui" or "data driven data loop groovy script soapui text file datasource", youll find loads of pages giving you what you need.

I advise 2 things:
1. Ensure testdata is spread across multiple files with single phone number values in each rather than a single file with multiple phone number values as i find it easier to script for that.
2. Make sure you datasource file is .txt or .csv. dont bother sticking testdata in .xls files, i find it a lot easier (code is more basic) to code to source the values from a .txt/.csv file rather than from a .xls

Any more help, just shout

Cheers,

Rich


Ricj
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
New Here?
Join us and watch the welcome video:
Top Kudoed Authors