Editing unit test data
You can edit your existing unit test data manually without changing your unit test parameters.
Go to the Pipes module from the side navigation bar.
Open the pipe that you want to edit the unit test for.
Click the Test mode icon
located in the upper-right corner of the canvas.Select the test that you want to edit from the list of unit tests.
Click on the test and click on the More options menu
, and then click on the Edit test
icon.(Optional) You can update the unit test's name and description on the Details tab.
(Optional) Click the Data tab to update the Expected results data source.
(Optional) Click Import expected results to load expected results.
In the Import expected results data modal, either drop a file or click to upload a file.
Turn on Configure import to see the column type, and if you want to obfuscate any of the data.
(Optional) In your data source drop-down, click one of the following options: Leave empty, a data source from a pre-populated list of data sources, or + Create new data.
(Optional) Click the Match fields button to match the fields between the input source and the test source data. You can also choose to automatch the fields. Once you've matched the fields in the data, click Next.
Note
All fields must match, or you will get an error.
Click Save, or use the arrow to click Save as to save the file in a different name.
Important
If you choose the Save option, you replace your existing data with the data you just entered. This option affects your original dataset. For example, if you have a data set used in three unit tests, this option updates the data set in all three unit tests.
If you choose the Save as option, the data becomes a new data source, as if you're creating data from scratch. This option does not affect your original dataset. For example, if you have a data set used in three spots, this option only replaces the data in the unit test in which you've made the update. The other two unit tests will use the original data.
(Optional) Click the Edit on the Data tab to edit the test data source directly.
(Optional) Click Add row to add a row to the test data. You can either type in data directly or copy data from your local CSV file to the screen.
(Optional) Click Delete row to directly delete any rows in the test data.
(Optional) Click Load input data to bring in your own test data, up to 100 rows. You can also copy and paste any data from a CSV file directly. If the file has more than 100 rows, only the first 100 rows are used.
(Optional) Click Load file to directly load a test data CSV file with up to 100 rows. If the file has more than 100 rows, only the first 100 rows are used.
Click Save.