Manual Addition of Tests to the Test List

Tests from circuit code files and test device files can be added to the test list manually from the Categorise Devices, Test Device Files, and XJRunner Setup screens after the device has been categorised. This gives you the flexibility to add tests from wherever you are working at the time. In each case, the process is similar:

  1. Decide whether to add it to an existing test group or to place it in a new one.
  2. Select the device to be tested
  3. Choose the test function to be run.

The function is added using either the Edit Test Group or New Test Group dialog box, depending on whether it will be placed into an existing test group or into a new one that is to be created.

Opening the Dialog Box to Add a Test Function

The method for opening the Edit Test Group or New Test Group dialog box differs depending on which screen you are working in.

Starting from the Categorise Devices Screen

In the Categorise Devices screen, the dialog is opened by selecting the relevant device from the right hand list of categorised devices and clicking the XJRunner Tests button as shown in Figure 4. Alternatively, right-click on the device and select XJRunner Tests from the context menu.

1: select the device 2: click to add a test

Figure 4: Manually Adding Tests from the Categorise Devices Screen

Starting From the Test Device Files Screen

To add a test to the test list from the Test Device Files screen, select the relevant test device file and click on the XJRunner Tests icon or right-click on the device and select XJRunner Tests from the context menu.

1: select the device 2: click to add a test

Figure 5: Adding Tests from the Test Device Files Screen

Starting From the XJRunner Setup Screen

When working in the XJRunner Setup screen, a test can be added to an existing test group by selecting the required test group and clicking Edit... at the bottom of the test list:

1: Select the required test group 2: Click Edit...

Figure 6: Adding a Test to an Existing Test Group in the XJRunner Setup Screen

To place a test into a new test group while in the XJRunner Setup screen, click the Add Group... button at the bottom of the test list:

Figure 7: Adding a Test Function to the Test List from the XJRunner Setup Screen

Choosing or Creating the Test Group

Adding the function to an existing group is done in the Edit Test Group dialog box, whereas placing it in a new group that needs creating is done in the New Test Group dialog. However, in both situations, the process is the same once a group has been selected or named.

The first step is to select the required test group or to provide a name for a new group.

Using an Existing Test Group

If you are working in the XJRunner Setup screen, you will already have chosen the test group but if you are in the other screens, you must choose the required test group before continuing. In that situation, the Select Test Group dialog box will open automatically to allow you to select a group.

Creating a new Test Group

When creating a new test group, simply enter a unique name in the New Test Group dialog box.

Adding the Functions

Having chosen the test group or named a new one, the next step is to add the test functions. The following example will be shown using the New Test Group dialog box, but the process is the same for both situations.

If necessary, provide a unique name If necessary, select the device to test Select the test function(s) Click to add Added test functions will be shown here

Figure 8: Adding a Test to a Test Group

The process is as follows:

  1. If you are in the XJRunner Setup screen, select the device to be tested from the Test Device Selector box in the top left. If starting from the other screens, you will already have chosen the device and it will therefore have been automatically selected when you opened the dialog box.
  2. Select the function(s) from the list of those available in the Function Name section and click Add Selected Functions. Multiple functions from the list can be added simultaneously by holding down the Ctrl key while selecting. The newly added test function(s) will now be listed on the right, along with any already in the group.
  3. Test functions from other device files can be added to this group at the same time by selecting another device in the Test Device Selector and repeating the process.
  4. Use the up and down arrows at the bottom of the dialog box to adjust the order of tests within the group if necessary; they will be executed from top to bottom.
  5. Once all the required functions have been added and are in the correct order, click OK to accept the changes.
  • When a new group is created, it will appear at the bottom of the test list, and you may need to adjust its position so that the test groups run in the required order. Refer to How to Change the Order of Tests for guidance on how to move the test group.

Adding Functions Common to Several Devices

A test function from an additional code file may be used in multiple test device files. For instance, when testing a circuit that has several I2C devices, you will reuse functions several times to check each IC responds to its address. You may therefore wish to place all those tests into one group entitled, for example, Check Presence on I2C Bus.

In the dialog box, select the devices in the Test Device Selector that you want to be in the group by holding down the Ctrl key while selecting them (in the example of Figure 9, this is U5, U11 and U12). Functions used in their device files that have the same name will now be displayed in the Function Name box in the bottom left.

1. Select devices with common functions 2. Select function(s) to add to group 3. Click to add selected tests to the Functions list 4. Clicking OK in dialog adds group to test list

Figure 9: Creating a Test Group for Devices with a Shared Function

  • Only identically named functions that are present in every selected test device file will be shown.

Select the function(s) you want to add to the test list and click Add Selected Functions. They will now appear in the Functions list on the right.

If necessary, use the up / down arrows at the bottom of the dialog box to adjust the order in which the functions will run.

Clicking OK will add these new functions to the group in the test list.

Adding Global Functions from Circuit Code Files

The process for adding test functions from circuit code files is very similar to that described above for adding functions from test device files. However, these functions will not be listed with those from test device files in the Function Name box.

To access the list of functions that can be added from circuit code files, click the Add Global Function button to open the Available Global Functions dialog box as illustrated by Figure 10 below.

Select the required function(s) and click OK to add them to the Functions list. Multiple functions can be added simultaneously by holding down the Ctrl key while selecting.

Once all the functions required for this test group are listed in the Functions section of the New Test Group or Edit Test Group dialog box, use the dialog's up and down arrows to adjust the order in which they will be executed if necessary. To add the test group, click OK.

1: click to add functions from circuit code files 2: select test function(s) 3: click to add to Functions list

Figure 10: Adding Global Functions from Circuit Code Files

  • Functions from circuit code files can be mixed with those from test device files in the same group: after adding functions from test device files, instead of clicking OK, continue by adding global functions from circuit code files so that they all appear together in the Functions list. Adjust the order of the tests if required and then click OK to commit the group.

Adding Global Functions that have Input Parameters

Some functions require input parameters. For example, a programming function will normally need to be given a filename and filetype. Functions like this are not shown by default in the list of Available Global Functions (Figure 10 above).

To add functions that need input parameters, add a tick to the Show Functions with Input Parameters checkbox:

Figure 11: Adding a Function that Requires Input Parameters

The function's input parameters can be configured as described later in the section Setting a Function's Input Arguments.

XJDeveloper has two built-in functions that require input parameters, and both are related to programming FPGAs and CPLDs:

  • RUNSVF executes an SVF file
  • RUNSTAPL executes a Jam/STAPL file

To add these to a test group, tick the checkbox and select them from the extended list.

  • Built-in functions such as RUNSTAPL come from the system rather than a library file, which is why the Available Global Functions dialog does not state a location for the function.

Finding Available Tests That Haven't Yet Been Added

To check if any of the project's suitable test functions are missing from the test list, click Suggest Tests... at the bottom of the XJRunner Tests screen:

Figure 12: Check for Tests that Haven't Been Added to the Test List

This will display a list of tests already in the test list and other possible test functions in the project that haven't been added (see Figure 13 below). Those already in the list will be shown in grey italic text. In the following example, there are two test functions that haven't yet been added. XJDeveloper lists them in their predefined test groups (or in the Auto-added Tests group if one isn't defined); the new test can be dragged to another group if required.

  • The list will show global functions that return a single integer parameter. However, for a function to be valid as a test, its return parameter must represent the pass / fail outcome (with zero indicating a pass). Care must therefore be taken when adding functions to ensure only those that return a suitable value are used.

Figure 13: Using Suggest Tests to Find Tests Missing from the Test list

To add the additional tests, leave the ticks in place and click OK.

  • Functions will be suggested from circuit code files and test device files if they have global scope, return a single integer parameter, are error-free, and are preceded by the @testfunction tag in their XJEaseDoc entry. If a test device file has no functions with that tag, all of its error-free global functions that return a single integer parameter will be listed.