TestDataGeneratorBlock Editor-TestData Editor/en

Aus expecco Wiki (Version 25.x)
Zur Navigation springen Zur Suche springen
Testdata Generator Editor

The test data editor is used to set the values generated by a test data generator block. It can be found on the "Data" tab after selecting a test data generator in the navigation tree.

To the right, you see an example for some data in the editor.

Buttons

  • Datei:Icon Open External CSV Editor.png Open an external CSV Editor application (as specified in the "External Tools" settings. If no CSV editor is specified in the settings, a regular text editor is used. If no regular text editor is defined in the settings, the builtin FileBrowser is used as editor.
  • Datei:Icon Import CSV TableData.png Import rows from a CSV file. The file may optionally contain timing data in the first column of each row. The file must use ";"s as column separator.
  • Add a new entry to the data list
  • Datei:Icon Add Multiple Data.png Add multiple new entries to the data list
  • Datei:Icon Insert Datarow.png Insert a new entry to the data list before the currently selected row. The timing value is computed to be in-between the selected and the row before.
  • Remove the selected entry from the data list
  • Change the order of the datasequence (move the selected row)

Usage

The editor is separated into at least two columns. The first contains the sequence number of the entry and the second contains the delay time for the entry. The other columns contain data for each output pin. The data columns are filled with datatype specific values and should be filled in as required. Additional columns will be shown, if more output pins are defined in the schema page. Please note that the list will be sorted according to the time delay.

When the block is invoked during an execution, it will send the data from the list to its output pins after the specified delay. The block in the example above would start immediately by sending the string 'One' to its output pin. Then, after a delay of one second it would send the string 'Two', after two seconds 'Three' and so on.

Importing Existing Data Sets from a CSV File

If you already have the data present present in an appropriate format, you can immediately use the "Import from CSV" menu button and import both pin names and data values. You can either import the first column of each row as the timing column, or alternatively let the imported generate time values for you (with 1 second delta).

If the data is not present in an appropriate format, you will first have to use an external CSV editor to modify the data as required: click on the "Open External CSV Editor" icon. This opens an editor application as defined in the "External Tools" settings dialog. We recommend, to set this to a CSV-capable editor, such as excel or ocalc (from the OpenOffice suite). There, load or fill in the rows, save and close the application.

If you do not have any useful CSV-editor installed, specify an ordinary text editor in the settings (vi, emacs, notpad or notepad+), edit the file as above, and paste the CSV rows as text. Then save and finish the editor.

See Also

As an alternative to a test data generator block, you can also use an attachment containing CSV data records and feed that data into a CSV-reader block, optionally followed by a delay block (both found in the standard library). The contents of a CSV attachment can be edited with a spreadsheet application (Excel or OpenOffice) or a text editor (notepad), which is often more convenient to use (but may take longer to start up). However, notice that producing data sets with delays in between is much easier to setup and understand when a test data generator block is used.



Copyright © 2014-2024 eXept Software AG