Create a scenario that uses multiple rows from a csv file per each execution.
ScenarioBuilder allows you to attach a CSV file on the Scenario level and on the Component level. While only a single row can be accessed per iteration from files attached to the Scenario, multiple rows can be accessed per iteration from files attached to Components. Let’s explore.
For our example, we’ll create a CSV file containing Patients;
And a CSV file containing Medications;
Next we’ll build a Scenario that sets up a patient, and allocates three medications to that patient. To accomplish this, we’ll attach the Patients CSV file to the Scenario;
And the Medications CSV file to a Component, which we’ve named “PatientMeds”;
We’ll insert a “Loop” Action ahead of the “Execute Component” Action and set it for 3 iterations. Our Scenario looks like this;
Our “Execute Component” Action calls the “PatientMeds” Component, which simply types a value from the Medications CSV file and enters it into the patient record. The Loop Action will cause this Component to repeat 3 times;
Here’s the result of one execution of our Scenario;
Mission accomplished. Our Scenario succeeded in creating a Patient record with three medications attached.