Test Data Editor
Overview
Test Data Editor is a graphical utility that can be used to edit test data files (*.data.json). The data files are written in JSON format so they can be created and modified using any text editor. However, Test Data Editor is provided for convenience since it displays test data in tabular form and has the usual editing tools found in most database or spreadsheet applications.
Command line arguments
testdataeditor
-h
|--help
: Print a help message and exit.[paths]
: Directory and/or files to open.A space-separated list of paths pointing to directories and data files. Only one directory will be opened, either the first one provided in the list or the parent directory of the first data file. Directories will be opened in the File System pane and data files will be opened as separate tabs in the main window.
Main components
The Test Data Editor has 3 panes in it, and looks like this:
File System pane
The File System pane provides a convenient way to see the files and the directory structure all at once. Clicking on a test data file in the File System pane opens it in a new tab or navigates to an already existing tab.
Columns pane
The Columns pane displays the type information of the input and output columns which corresponds to the "types"
field of the data file. See Data Types section for more information.
Main window
The main window consists of the table view of the test data. Each data file is opened in a separate tab. The left-most column is the validated
flag. It is followed by the crash
column which is hidden by default unless the data file contains a "crash": true
entry. This is then followed by the input parameters and output parameters identified by [in]
and [out]
, respectively.
Use cases
Creating and editing test data
You can use Test Data Editor to create new data files and edit existing ones.
- Commands for creating, opening and saving test data files can be found under the File menu.
- Undo and redo, as well as commands for inserting, deleting, duplicating rows and columns can be found in the Edit menu.
- Options that affect how the data file is presented and which UI elements are visible can be found in the View menu.
- A link to the documentation can be found in the Help menu.
Validating test rows
After discovering test data, it is important to manually validate the expected outputs. This can be done for individual rows by using the checkboxes of the validated
column. One can also mark selected rows as validated or unvalidated by going to Edit > Validate Rows in the menu.
Viewing and resolving crashes
During test data discovery, cocotestengine
may also be able to find inputs that cause the application to crash. These rows have a "crash"
parameter set to "true"
. In Test Data Editor, the crash column will be checked and the entire row will be rendered in red text such as rows 4 and 5 below:
If the crash has been resolved, the checkbox under the crash column can be unchecked. The next time the datafile is executed, cocotestengine
will verify that no crash is observed.
Coco v7.2.1 ©2024 The Qt Company Ltd.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.