The Shared Source CLI 2.0 Testing Environment

Contents

What's changed

The Shared Source CLI 2.0 release adds very few new tests to the existing SSCLI release codebase. Some tests have been removed as they are no longer required (usually due to codebase changes).

Overview

The tests in the Shared Source CLI (SSCLI) are broken into two large sections, with each section broken into several smaller subsections. The large sections are:

PAL Test Suite

The Platform Adaptation Layer (PAL) Test Suite is designed to validate the quality of the PAL. You can run this suites of tests before anything else in the SSCLI is running; therefore, it has no dependencies on anything running other than the PAL itself.

The driver script for the PAL Test Suite is called pvtrun.pl. After you build the PAL, you can execute the tests by running this script; it will execute around 1200 tests from the palsuite directory.

The PAL test harness is located in the test_harness directory. The test harness uses several environment variables that indicate where to find its test list, where to store results and where to find its helper driver xrun. These environment variables are usually set in a wrapper script, such as pvtrun.pl, but they can also be set individually in the environment for manual execution.

Additional tests are not run by default from the driver script. See the PAL test readme.txt for more details on running the remaining suites.

SSCLI Quality Suites

The SSCLI Quality Suites are the tests for everything other than the PAL. The test inventory is not a complete breadth test bed but is focused on key areas of functionality.

Quality Suites Test Driver

The main test driver is implemented in rrun.pl. The rrun driver assumes that tests are distributed in a directory tree, with their configuration information located in the directory with the tests. Tests are required to be self-verifying (no baselines are used).  The rrun driver traverses the directory tree starting with the working directory of the process that invoked the driver and working down the directory structure collecting the test information. All tests that match a simple set of criteria are executed and the results reported.

The source comments at the top of the rrun.pl file should be consulted for more complete details of driver operation.

Running the rrun driver from the tests directory causes the entire test inventory to be run using the default criteria. To run a subset of tests simply change the working directory to the one listed, and then run the rrun driver.

Quality Suite Tests

Base Verification Tests

The Base Verification Tests (BVTs) are a set of quick tests that can be run after a source modification is made to ensure that basic functionality continues to work correctly.  These are sometimes called "smoke tests." These tests are located in tests/bvt.

CIL Tests

The base common intermediate language (CIL) tests are located in tests/il_bvt. These tests provide core coverage of the CIL instructions in the system.

Verifier Tests

Verifier tests check the verifier in the JIT-compiler. These tests are located in tests/security/verifier. In addition to these tests, many tests throughout the tree require verification to be either off or on;  these are marked with the attributes <VERIFIERMUSTBEOFF> and <VERIFIERMUSTBEOON> in the appropriate rsources file.

Base Class Library Tests

You can find tests for the base class libraries in tests/bcl.

Miscellaneous Tests and Support Infrastructure

The tests/utilities directory contains support functions for other tests.

The tests/dev directory contains test that cover specific cases not covered by other tests but discovered during the development process.

Build and Logging

The test driver rrun respects build type.  Executables are built into the obj, objd, objdf subdirectory depending on build type (see buildtools\building_sscli.html).

Build log files are named rrun.log and rrun.err on the free build, rrundf.log and rrundf.err on the fastchecked build, and rrund.log and rrund.err on the checked build.

Test Strategy

The following are some quick guidelines to help you plan your test usage:


Copyright (c) 2006 Microsoft Corporation. All rights reserved.