Viewing and editing test data

Procedure

  1. Once your test is generated, it will appear in the VS Code’s test explorer. The test explorer is normally on the left side of the editor and has a lab beaker icon. Click on the icon to see your tests in a test explorer view.
  2. Expand each test case to see individual unit tests.
  3. You can use the search field in the test explorer to narrow down tests if you have a long list.
  4. Right-click on a unit test and select Show test points explorer.
  5. This will open a view where each test point is displayed in order of execution.
  6. Click on each test point. This will open a Test Data Editor view that shows the value of data with which a test point was called.
  7. By default program under test is enabled. You can enable test points individually by toggling Assert enabled variables in test point occurrence. Once a test point is enabled, data will be validated for equality when a test runs.
  8. User can also choose to modify data so that a test is executed with the modified data instead of the originally recorded values.
  9. You can also enable categories of test points by changing the value of validate flag in the ztest file.