Test Suites » Solaris Test Framework
en

Solaris Test Framework

Solaris Test Framework

 The Solaris Test Framework (STF) is a test harness - a collection of software that builds, configures, executes, unconfigures, cleans and packages tests in a standard way. STF provides the framework needed to develop and execute test suites for Solaris technology in a consistent manner.

STF Features

  • Commands for building (stf_build), configuring (stf_configure), executing (stf_execute) and unconfiguring (stf_unconfigure) test suites and tools
  • Makefile support that defines macros and targets helpful for test development
  • Support for assertion-based testing and standard result codes
  • Standard build environment that can be customized if needed
  • Support for building and running on all Solaris-supported platforms
  • Configurable timeout values for test case execution
  • Journaling interfaces for complete, parsable test suite logging
  • Support for running tests as regular user and super user
  • Support for test-case specific setup and cleanup
  • Seamless integration with STC 2.0 packaging and checkenv features
  • Journal parsing tool (stf_filter)
  • Extensible user-defined execution modes
  • Support for table-driven testing and automated test case generation
  • Support for synchronized execution of multi-system tests (mstf)

Installing the Package

 To install the STF package, use the following command as super user:

    # pkgadd -d <package location>  SUNWstc-stf

 Where <package location> refers to the path containing the SUNWstc-stf package directory. By default, STF is installed into the /opt/SUNWstc-stf directory.

Removing the Package

 It is recommended that you install the package from scratch, rather than on top of an existing installation. Thus, if an old version of the package is present use the following command as super user to remove the package:

    # pkgrm SUNWstc-stf

Building the Package (Optional)

 If you need to create the STF package from the source code use the following steps:

  1. Build the STF proto area (See Note 1 below)


    % cd &#x3c;workspace_path&#x3e;/usr/src/tools/stf    % make
  1. Add the path to the STF bin directory to your PATH environment variable


    % PATH=&#x3c;workspace_path&#x3e;/proto/tools/stf/bin/`uname -p`:$PATH    % export PATH

 The above example uses sh-compatible syntax.

  1. Build STF package
    % stf_build package

 The binaries will be located in the proto area at:  <workspace_path>/proto/tools/stf

 The SUNWstc-stf package will be located at:  <workspace_path>/packages/`uname -p`

Using STF to Run Tests

 To run STF-based test suites, follow these generic steps:

  1. Install STF and checkenv


    # pkgadd -d &#x3c;package location&#x3e; SUNWstc-stf    # pkgadd -d &#x3c;package location&#x3e; SUNWstc-checkenv
  1. Install the test suite using pkgadd or by extracting the tarball at an appropriate location. For example,
    # pkgadd -d &#x3c;package location&#x3e; SUNWstc-&#x3c;pkgname&#x3e;
  1. Add STF binaries to your PATH


    % PATH=$PATH:/opt/SUNWstc-stf/bin/`uname -p`    % export PATH
  1. Run the tests
    1. Configure the test suite to run on the system(s) under test.



    % stf_configure    ...    ... [many lines of output]    ...

 stf_configure prints progress messages on the invoking terminal. The results of stf_configure are placed in the directory /var/tmp/<test suite root>/config, where test suite root refers to the directory under which the test suite's STC.INFO file resides.


    1. Execute the tests



    % stf_execute    ...    ... [many lines of output]    ...

 Results of test execution are placed in the directory /var/tmp/<test suite root>/results on the system on which stf_execute was run.

Tags:
Created by admin on 2009/10/26 12:11
Last modified by Jim Walker on 2009/10/26 20:23

Collectives


XWiki Enterprise 2.7.1.34853 - Documentation