The Invert Sample project includes three TestCases: Init, Tick, and InvertTest. In this exercise, we create a new TestCase which replaces InvertTest.

The Test Harness for the Invert sample application exports two Tasks, Task_5ms and Init, and two Ports, InVal, and OutVal.  You will use these signals to build a new TestCase.

To build a test case, do the following:

1.From the MxVDev main menu, select File->New->TestCase.

NewTestCase

2.Name the TestCase MyTestCase and press the OK button.  The Pick Signals box is displayed.

GS_PickSignals

3.Make sure that Stimulus>Standard is selected on the top left box.

4.Select InVal in the Available Signals box and click addPickSignal to add it to Selected Signals.

5.Then select Response>Standard on the left-hand side and add OutVal to the Selected Signals (on the right).

6.Click the OK button and save the TestCase with an appropriate name.

GS-MyTestCase

Scheduling

MxVDev displays the TestCase viewer/editor. You are now ready to add some scheduling information.

1.Choose TestCase->Properties from the main menu to display the TestCase property panel.

Click to expand.

Click to expand.

2.Click the Test Execution Control tab.

3.Ensure that the Time Unit (shown in the upper-right) is set to ms.

4.Set the Test Resolution to 5 (ms).

5.Set the TestCase Duration to 5000 (ms).

6.Click OK to close the property panel.

Edit the Signal

1.Add a transient pulse to your input Signal, InVal. Do this by double clicking somewhere on the signal line (between 0 and 5). You can drag the right (or left) side to adjust the duration of the pulse. You can add multiple pulses if you wish. For more details, see Editing Test Patterns.

GS-Pulse

2.Click the Save button on the main tool bar to save the TestCase. Test cases normally go under the ScenariosAndTestCases folder inside the project's MxVDev folder.

You have created your first TestCase. The next step is Creating a Scenario to run your TestCase.

 

Related Topics:

Manipulating TestCases

Viewing Signals

Guidelines for Creating TestCases