Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Embedded
Windows Embedded CE
Windows CE 5.0
Windows CE Test Kit
 Test Cases and Test Case Attributes
Platform Builder for Microsoft Windows CE 5.0
Test Cases and Test Case Attributes
Send Feedback

Test cases are simply methods in a TestSuite class that are marked with TestCaseAttribute. Test case methods are required to return a value of type Logging.LogResult, a Tux.Net enumeration that represents different test result values. By default, Tux.Net also expects these methods to have an empty parameter list, although with more advanced usage, test methods can accept data parameters passed to them by Tux.Net.

Here is an example of a simple test case that logs a comment and returns a passing result:

    [TestCaseAttribute( "Sample test case", Type = TestType.Functional )]
    public Logging.LogResult SimpleSample ()
    {
        GlobalLogger.AddComment("inside SimpleSample");
        return Logging.LogResult.Pass;
    }

Notice that a string and a Type was provided to the TestCaseAttribute. These attribute parameters describe and categorize the test case. The string provides a description of the test case, which helps add semantic readability to the resulting log file. The Type parameter categorization makes it possible for Tux.Net to distinguish different test types, which can be helpful when running tests.

Tux.Net attributes can be used to define the criteria for running a test case:

  • Test Type

    Categorize the test case in terms of how it should be used

  • Grouping.

    Use descriptive keywords to group test cases in a convenient manner

  • Language, Platform or Sku restrictions
  • Custom attributes that you define

For instance, if you want to make sure that a test case only runs on a particular kind of device, you can add attributes to identify that restriction. Then, when Tux.Net is asked to run test cases, it can automatically determine whether the device it is running on is appropriate for the test case, and skip or run the test as a result of that determination.

Tux.Net command-line options include the ability to specify Test Type or Group, in addition to specifying individual test cases or test suites. There are five test types to choose from:

Test Type Description
BVT Basic or Build Verification Test; a test that covers basic and critical application functionality
Functional Test Covers application functionality in a basic fashion
Stress Test Stresses functionality through extreme repetition, depth, or variation
Unit Test Validates an application component feature; white-box test
Performance Test Tests performance issues

Send Feedback on this topic to the authors

Feedback FAQs


© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker