3.10.4.Convert to Data Loop Refactoring
You can use the Convert to Data Loop refactoring to quickly convert a normal test script to use data from a CSV file.
Convert to Data Loop Refactoring
Select the code you want to create a loop for and click on the create data loop button or clicking on menu item
Refactor --> Create Data Loop. Marathon displays Create Data Loop dialog.
Select a line of code in the selected script. The below pane displays the constants that can be extracted. Use the checkboxes to select the items that need to be accessed from the data file. You can change the name of a variable by modifying the
Extract with name column.
Click on OK buutton. MarathonITE prompts for a file name for the data file.
Provide a file name and click OK. Marathon currently supports CSV files only. You can edit csv file using CSV editor to add different values.
Marathon saves the first row in the data file and also will update the script to use the data driven loop.When the test case is played Marathon runs the test case with data in the csv file.