I have situation where I have multiple scenarios in my setUp method, and in one scenario I’m writing (saving) some data into csv file, and in the next scenario I’m using that csv file as a feeder.
This is the example:
The scenario2 fails with ‘feeder source is empty’, and indeed the csv file is empty at the beginning, but after the scenario1 finishes, csv file should be populated with the data.
I also tried with andThen method, but no luck.
Do you have any suggestion how to avoid this issue?
Several things to note for this to work:
- the file must exists with the headers when initializing (during the construction)
- the scenario1 must write quickier than the scenario2 reads.
- the scenario1 must write more (or at least as many as) the scenario2 reads.
- the feeder must be configured with
batch() loading mode.
- Is there a reason why not to write this data into the user session?
- You can think about creating your own feeder (as explained at the begining of the document) based on a queue
andThen will ensure that all the scenario1 will have written their data before beginning the scenario2, but you will still have to create the file (with headers) first
Hope this helps,
Hey @sbrevet !
This helped me, I just added headers in the file (it was empty) and added batch loading mode.
I thought about creating my own feeder, but the client wanted to save the data into the file.
Thanks a lot for your help.