How To Generate Test Data
Good csvpath development practice is to create tests for each statement. Creating even small test data sets can be time consuming. FlightPath can help create representative data quickly.
How to do it
- Open FlightPath and check that your AI config is correct like this.
- Open
examples/schemas/schemas.csvpaths - Click on the AI tab at the top of the right-hand column
- Select the
Dataactivity

- Enter a name and instructions:
Create a test data that includes people from states west of the Mississippi. - Click submit and see the request appear in the list below with a yellow dot signifying the work is active

- As the request processes, see the Help and Feedback area for tabs giving ongoing status information. These tabs can be closed or ignored. Click the request name to reopen them.

- When the reply is available, the status dot by the request’s name goes green.

- Click the name to open the results in the Help and Feedback tabs. Right-click on the
Resultstab and selectSave as.

- In the save name dialog be sure to change the file extension to
.csvfrom.txt

- Switch back to the csvpath in
examples/schemas/schemas.csvpathsand change thetest-data:directive in the leading comment of the first csvpath to the relative path to your new test data file. Right-click on the file and selectCopy relative path, if needed.

- With your cursor in the csvpath statement, hit
ctrl-rto run the csvpath. See that the new data validates successfully.