Creating test data using Excel
Another useful method of creating test data is to define the data in MS Excel, and then create a job to convert the Excel worksheets into the format required by the application, such as a CSV file or database table.
Getting ready
Open the Excel workbook chapter10_jo_0130_ExcelTestData.xlsx
that can be found in the data directory. You will see two worksheets: customer and item.
How to do it...
The steps for creating test data using Excel are as follows:
- Highlight the first two rows in the customer table and drag them down to create two more customers.
- Copy the first 4 lines from the order workbook and change the customers to be 3 for the first two new rows and 4 for the final two. Ensure that order ids are contiguous.
- Open the
jo_cook_ch10_0130_excelTestDataLoad
job. You will see that the customer Excel file is being copied to an equivalent XML file. - Drag the order Excel object from the repository location, shown as follows:
- Drag a
tXMLOutput
component and link it to...