Share via


CTK Automation Tool Solution (CATS) (Compact 7)

3/12/2014

You can use the Windows Embedded Compact Automation Tool Solution (CATS) tool to automate a Windows Embedded Compact Test Kit (CTK) test pass. CATS provides the framework to automate a broad range of test scenarios that have historically been limited to being run manually.

Features

When you use the CATS tool to automate a test pass, the following features are available:

  • A wizard that you can use to create the configuration files used by a CATS test pass.

  • Automated execution of CTK tests, from start to finish.

  • Compatibility with test scripts (.pvt files) that you create manually without using the CATS Wizard.

  • No system-defined limit to the number of individual tests within a CATS test pass.

  • Debugging capabilities for test scripts.

  • XML log files of CATS test pass results.

  • Extensibility for executing custom code that resets hardware devices. For detailed instructions, see Power Controller Automation DLL.

    Note

    Platform Builder for Windows Embedded Compact 7 deploys new system images to a device when it receives a BOOTME message from the device. Devices send a BOOTME message at the beginning of a power cycle. For CATS to deploy a new system image to a device, a mechanism must exist to trigger a device power cycle without user input. That mechanism is described in Power Controller Automation DLL.

To conduct a CATS test pass, you must first prepare the test, and then run it. Both stages generate important output files.

Test Preparation and Execution

The CATS tool, installed by default with the CTK, includes a CATS Wizard. You use the CATS Wizard to enter details of the test that you want to run. The wizard generates the configuration files and scripts that the CATS tool uses to execute the test.

The test pass executes based on the scripts and test configuration files that the CATS Wizard generates. The CATS tool uses your Platform Builder device connection to execute the tests on a remote Windows Embedded Compact powered device. You can use a commercially available power reset device as part of the test preparation setup to automatically reset a device.

Use the CATS Wizard to Define the Automated Test Pass Parameters

The CATS Wizard generates the files that define an automated test pass. The automated test pass uses the following files to run a test pass:

  • A script file that contains the user-selected tests to run.
  • Configuration files that contain device and reset information.
  • A batch file to start the CATS test pass execution.

You must be able to connect to your device from a development computer before you can define the automated test pass parameters. You must define these parameters, as described in the following procedure, before the CATS Wizard can generate the necessary output files to start your CATS automated test pass.

The CATS tool relies on a hardware reset device that can be automated and that you must purchase separately. Because the CATS tool cannot detect the device that you are using, you are responsible for creating the library (DLL) that the CATS tool must use to communicate with your power controller hardware to initiate a power cycle on your device. For instructions about how to create this DLL, see the section, Power Controller Automation DLL.

To define the automated test pass parameters

  1. On the development computer, on the Start menu, point to All Programs, and then click WindowsEmbeddedCompact7TestKit. For information about how to use the CATS tool without the CTK, see CATS Without the CTK.

  2. On the Tools menu, click CATS Wizard.

  3. On the Inputs tab of the CATS Wizard dialog box, under Select source for tests to be added to Automation script file (pvt file), select one of the following:

    Source Description

    None (creates an empty script)

    Does not use any tests; creates an empty .pvt script file that you can then add your custom test choices to.

    All tests in CTK catalog (.tcg file)

    Uses all automated tests within the CTK test catalog (.tcg) as a source.

    Tests from a CTK pass (.tps file)

    Uses all of the automated tests present in the test pass file (.tps).

    The following example assumes that you selected the option Tests from a CTK test pass (.tps file).

  4. In the Select source for tests to be added to Automation script file (pvt file) box, enter the full name and path of a test pass file (.tps).

    For information about creating a test template, see Create a Test Pass.

  5. Under Enter target device details, in the Device Name: box, enter the name of the device. Use the name that the device broadcasts (BOOTME broadcast message) when negotiating an image download in Platform Builder. Disconnect any existing CTK or Platform Builder connection to the device.

  6. In the CPU list, select your CPU architecture.

    If your device is an image running on a virtual PC, select x86.

  7. In the Image Path box, enter the full name and path of an image file.

    By default, this file is named nk.bin and is located in the build output folder of your OS design project.

    When the CATS tool runs your tests, it automatically loads this image onto your device.

  8. If you have already configured a hardware reset device, in the Reset Device list, select your previously configured reset device.

    If you have not previously configured a hardware reset device, you can add a reset device from the Configuration tab of the CATS Wizard dialog box, when you provide the connection DLL location for your particular device.

    On the Configuration tab of the CATS Wizard dialog box, follow the steps below to provide the location of a connection DLL that the Cats Wizard will use to reset your device in preparation for the test pass.

    1. In the CATS Wizard dialog box, click Configuration tab.

    2. Under Please enter the details to configure a Reset Device, in the Reset Device Name box, enter a name for your reset device.

    3. In the Connection Dll box, enter the location where your connection DLL is located.

    4. Click Add New.

    5. In the confirmation box that appears, click OK.

      Note

      You can edit your reset device entry by clicking Update or delete your reset device entry by clicking Delete.

  9. In the Automation run name box, type a name for your automated test pass.

  10. In the Configuration files location box, enter the location where you want the CATS Wizard to place the configuration files that it generates.

  11. In the Test pass results location box, enter the location where you want the CATS Wizard to place results for the completed test pass.

  12. Click Create.

    The CATS Wizard generates the files required to run the tests and saves them to the location that you specified for Configuration files location. You can click View Files on the message box that appears to view the configuration files or browse to the Configuration files location manually.

Run the CATS Test Pass

The CATS tool creates a batch file (CATSExecution.bat) that the CTK uses to launch the CATS automated test pass. The batch file is saved to the Configuration files location folder that you previously specified.

To run the Automation Tool Solution (CATS) test pass

  1. From the batch file location, click the CATS-produced batch file to begin the test pass. For more information about the files that are created by the CATS tool, see CATS File Reference.

    Note

    If you did not provide a location to save the configuration files to, the files are saved to the default location in the C:\Users<username>\Compact Test Kit\CATS\CATS Configuration folder.

  2. When the test pass has finished, a message appears stating that the CATS test pass has finished. Click OK to exit the pass.

View the CATS Test Results

After you run a test pass, a collection of test result files are created and saved to the folder location that you previously specified in the Test pass results location box in the CATS Wizard.

Note

If you did not provide a location to save the test pass result files to, the files are saved to the default folder location in the C:\Users<username>\Compact Test Kit\CATS\CATSResults

The results collection contains an XML file and text documents that list and report the test traces and results for the test pass. You can view the test results in the results collection by opening the files with a text editor or XML viewer of your choice.

See Also

Concepts

Compact Test Kit Overview