Training Getting Started: Difference between revisions
No edit summary |
|||
Line 8: | Line 8: | ||
The training collateral consists of the following: | The training collateral consists of the following: | ||
# The [[STRIDE_Overview#STRIDE_Framework | STRIDE Framework]] used to implement and execute tests | |||
# A set of specific [[#Recommend_Order | Training Modules]] that will guide you through the exercises | # A set of specific [[#Recommend_Order | Training Modules]] that will guide you through the exercises | ||
# ''Wiki articles'' that will provide background material and other technical information | # [[Main_Page | ''Wiki articles'']] that will provide background material and other technical information | ||
# Reference [[C/C%2B%2B_Samples | Samples]] | # Reference [[C/C%2B%2B_Samples | Samples]] | ||
# The [[STRIDE_Off-Target_Environment | Off-Target Environment]] | # The [[STRIDE_Off-Target_Environment | Off-Target Environment]] | ||
# and [[STRIDE_Overview#STRIDE_Test_Space | Test Space]] | # and [[STRIDE_Overview#STRIDE_Test_Space | STRIDE Test Space]] | ||
''For questions and support [mailto:training@s2technologies.com email | For more details concerning STRIDE refer to the following: | ||
* ''[[STRIDE_Overview_Video | Overview screencast]]'' | |||
* ''[[What is Unique About STRIDE | What is Unique About STRIDE]]'' | |||
* ''[[Types of Testing Supported by STRIDE | Types of Testing Supported]]'' | |||
* ''[[Frequently Asked Questions About STRIDE | Frequently Asked Questions]]'' | |||
''For questions and support [mailto:training@s2technologies.com email us]'' | |||
= Before Starting = | = Before Starting = | ||
Line 107: | Line 115: | ||
--testspace <nowiki>https://user-name:password@yourcompany.stridetestspace.com</nowiki> | --testspace <nowiki>https://user-name:password@yourcompany.stridetestspace.com</nowiki> | ||
--project Training | --project Training | ||
--space '' | --space ''MODULENAME'' | ||
--name ''YOURNAME'' | --name ''YOURNAME'' | ||
Notes: | Notes: | ||
* Concerning the '' | * Concerning the ''MODULENAME'' option: use the name that corresponds to the training module currently underway (e.g. TestBasic, TestParam, etc.) | ||
* ''YOURNAME'' should be set to your name (i.e. JohnD); omit spaces from this string | * ''YOURNAME'' should be set to your name (i.e. JohnD); omit spaces from this string | ||
* If you access the Internet via an HTTP proxy please read [[STRIDE_Runner#Using_a_Proxy | '''this article''']] | * If you access the Internet via an HTTP proxy please read [[STRIDE_Runner#Using_a_Proxy | '''this article''']] | ||
Line 126: | Line 134: | ||
= Recommend Order = | = Recommend Order = |
Revision as of 23:24, 30 August 2011
Overview
Our training approach is based on a self-guided tour of the STRIDE Testing Features using reference examples and assigned exercises. The set of examples and the implemented exercises will be built and executed using a standard desktop computer.
The software under test, reference examples, and exercises have been designed to be as simple as possible while sufficiently demonstrating the topic at hand. In particular, the software under test is very light on core application logic -- the focus instead is on the test code that leverages STRIDE to define and execute tests.
The user is expected to work through each of the training modules covering a specific testing feature. Once the exercises are completed (actual test cases implemented), the results are published to Test Space (and validated against a pre-created baseline).
The training collateral consists of the following:
- The STRIDE Framework used to implement and execute tests
- A set of specific Training Modules that will guide you through the exercises
- Wiki articles that will provide background material and other technical information
- Reference Samples
- The Off-Target Environment
- and STRIDE Test Space
For more details concerning STRIDE refer to the following:
- Overview screencast
- What is Unique About STRIDE
- Types of Testing Supported
- Frequently Asked Questions
For questions and support email us
Before Starting
Before you can start setting up your environment you need the following 3 items:
- STRIDE Desktop Installation Package (one of the following)
- STRIDE_framework-windows_4.3.yy.zip (Windows desktop)
or
- STRIDE_framework-linux_4.3.yy.tgz (Linux desktop)
- Training Source files
- STRIDE_training_source.zip
- Test Space User Account URL and Logon Credentials
- Test Space URL (https://YourCompany.stridetestspace.com)
- User-name
- User-password
Desktop Setup
The training requires that you install the Desktop Framework and that the Off-Target Environment is setup correctly and verified.
For an overview of the installation steps please refer to this article.
The following steps are required:
- Install your desktop Framework package
- Read about the Off-Target Environment
- Install host compiler for your desktop
- Use the Off-Target SDK to build a Test App
- Run STRIDE diagnostics with the Test App built
Training Source Setup
The following source code can be found in the STRIDE_training_source.zip file:
software_under_test.c | h TestBasic.cpp | h TestParam.cpp | h TestFixture.cpp | h TestExpect.cpp | h TestRuntime.cpp | h TestFile.cpp | h TestDouble.cpp | h
The software under test is contained in the file software_under_test.c | h. All of the public functions use sut_ as a prefix. All training modules test against this file. Although the test examples are contained in C++ files, most of the test logic is written in standard C.
Once the files are obtained the next step is to rebuild the TestApp using the training source code. Move all of the files into the directory %STRIDE_DIR%\SDK\Windows\sample_src (or $STRIDE_DIR/SDK/Posix/sample_src for Linux) and follow the instructions for Building a TestApp.
Once built, list all Test Units within the generated database file using the following command:
Windows
> stride --database=%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb --list
Linux
> stride --database=$STRIDE_DIR/SDK/Posix/out/TestApp.sidb --list
The following remoted Functions and Test Units should be displayed:
Functions sut_strcpy(char const * input, char * output) : void strlen(char const * _Str) : size_t Test Units TestBasic_FList() TestBasic_Class() TestBasic_CClass() TestDouble_Reference() TestDouble_Definition() TestExpect_Seq() TestExpect_Data() TestExpect_Misc() TestFile() TestFixture() TestParam(int data1, int data2, char * szString) TestRuntime_Static() TestRuntime_Dynamic(int NumberOfTestCases)
Test Space Access
As part of the training users implement exercises (test cases). As each exercise is completed, the results are expected to be uploaded to Test Space. Accessing Test Space (uploading, viewing, etc.) requires an user-name and password. Before working on a training module please confirm that your user account has been set up by logging in.
Test Space will have expected results using baselines. This is used to automatically verify if the exercises have been implemented correctly (at least to some degree). For capturing test results a Training project has been created with the following Spaces:
TestBasic - Basics training results: TestBasic.cpp | h TestParam - Parameters training results: TestParam.cpp | h TestFixture - Fixturing training results: TestFixture.cpp | h TestExpect - Expectations training results: TestExpect.cpp | h TestRuntime - Runtime API training results: TestRuntime.cpp | h TestFile - File IO training results: TestFile.cpp | h TestDouble - Doubling training results: TestDouble.cpp | h
To publish your results using the STRIDE Runner the following command-line options should be used:
--testspace https://user-name:password@yourcompany.stridetestspace.com --project Training --space MODULENAME --name YOURNAME
Notes:
- Concerning the MODULENAME option: use the name that corresponds to the training module currently underway (e.g. TestBasic, TestParam, etc.)
- YOURNAME should be set to your name (i.e. JohnD); omit spaces from this string
- If you access the Internet via an HTTP proxy please read this article
When confirming the correctness of your implemented exercise review the results that have been uploaded to Test Space. Under the column labeled COMPARISON WITH confirm that none is indicated for each of the sub-column.
Recommend Order
At this point you should be ready to start the actual training. The are 7 separate training modules and we recommend the following order:
- Basics - Covers basics of implementing and executing test cases
- Parameters - How to pass parameters to a test
- Fixturing - Leveraging setup and teardown featuring
- Expectations - Validating code sequencing along with state data
- Runtime API - Using the runtime services to dynamically create test suits / cases
- File IO - Reading and writing files existing on the host
- Doubling - Replacing a dependency with a stub, fake, or mock