Training Running Tests: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
== Background == | == Background == | ||
Device connection and STRIDE test execution is handled by the [[STRIDE Runner]] (aka ''"the runner"''). The runner is a command line tool with a number of options for listing runnable items, executing tests, tracing on test points, and uploading your results. The runner is designed for use in both ad-hoc execution of tests and fully automated CI execution. The command line interface is sufficiently configurable to lend it to a variety of | Device connection and STRIDE test execution is handled by the [[STRIDE Runner]] (aka ''"the runner"''). The runner is a command line tool with a number of options for listing runnable items, executing tests, tracing on test points, and uploading your results. The runner is designed for use in both ad-hoc execution of tests and fully automated CI execution. The command line interface is sufficiently configurable to lend it to a variety of uses. You've already seen some basic test execution scenarios in the other training sections - now we will look explicitly at several of the most common use-cases for the runner. | ||
Please review the following reference articles before proceeding: | Please review the following reference articles before proceeding: | ||
Line 11: | Line 11: | ||
== Build a test app == | == Build a test app == | ||
Let's begin by building an off-target test app to use for these examples. The sources we want to include in this app are <tt>test_in_script/Expectations</tt> and <tt>test_in_c_cpp/TestClass</tt>. Copy these source files to your <tt>sample_src</tt> directory and follow [[Off-Target_Test_App#Build_Steps|these instructions for building]] | |||
== List items == | == List items == | ||
Listing the contents of database is an easy way to see what test units and fixturing functions are available for execution. Open a command line and try the following: | |||
stride --database=%STRIDE_DIR%\sdk\windows\out\TestApp.sidb --list | |||
You should see output something like this: | |||
<pre> | |||
Functions | |||
Exp_DoStateChanges() | |||
Test Units | |||
s2_testclass::Basic::Exceptions() | |||
s2_testclass::Basic::Fixtures() | |||
s2_testclass::Basic::Parameterized(char const * szString, unsigned int uExpectedLen) | |||
s2_testclass::Basic::Simple() | |||
s2_testclass::RuntimeServices::Dynamic() | |||
s2_testclass::RuntimeServices::Override() | |||
s2_testclass::RuntimeServices::Simple() | |||
s2_testclass::RuntimeServices::VarComment() | |||
s2_testclass::srTest::Dynamic() | |||
s2_testclass::srTest::Simple() | |||
</pre> | |||
A few things to notice: | |||
* The Functions (if any) are listed before the Test Units. | |||
* Function and Test Unit arguments (input params) will be shown, if any. The parameter types are described shown for each, absent any typedefs. | |||
== Trace on test points == | == Trace on test points == |
Revision as of 21:54, 26 May 2010
Background
Device connection and STRIDE test execution is handled by the STRIDE Runner (aka "the runner"). The runner is a command line tool with a number of options for listing runnable items, executing tests, tracing on test points, and uploading your results. The runner is designed for use in both ad-hoc execution of tests and fully automated CI execution. The command line interface is sufficiently configurable to lend it to a variety of uses. You've already seen some basic test execution scenarios in the other training sections - now we will look explicitly at several of the most common use-cases for the runner.
Please review the following reference articles before proceeding:
Build a test app
Let's begin by building an off-target test app to use for these examples. The sources we want to include in this app are test_in_script/Expectations and test_in_c_cpp/TestClass. Copy these source files to your sample_src directory and follow these instructions for building
List items
Listing the contents of database is an easy way to see what test units and fixturing functions are available for execution. Open a command line and try the following:
stride --database=%STRIDE_DIR%\sdk\windows\out\TestApp.sidb --list
You should see output something like this:
Functions Exp_DoStateChanges() Test Units s2_testclass::Basic::Exceptions() s2_testclass::Basic::Fixtures() s2_testclass::Basic::Parameterized(char const * szString, unsigned int uExpectedLen) s2_testclass::Basic::Simple() s2_testclass::RuntimeServices::Dynamic() s2_testclass::RuntimeServices::Override() s2_testclass::RuntimeServices::Simple() s2_testclass::RuntimeServices::VarComment() s2_testclass::srTest::Dynamic() s2_testclass::srTest::Simple()
A few things to notice:
- The Functions (if any) are listed before the Test Units.
- Function and Test Unit arguments (input params) will be shown, if any. The parameter types are described shown for each, absent any typedefs.
Trace on test points
with and without a filter...