Samples Overview: Difference between revisions
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
= Introduction = | = Introduction = | ||
The samples are [[Desktop_Installation#Directories_and_Files | provided with]] with the Desktop installation package. They are self-documented (using doxygen or perldoc) and this content will be attached to the test report whenever a sample is executed. They are | The samples are [[Desktop_Installation#Directories_and_Files | provided with]] with the Desktop installation package. They are self-documented (using doxygen or perldoc) and this content will be attached to the test report whenever a sample is executed. They are readily executable using our [[STRIDE Off-Target Environment | off-target (desktop) environment]] and can easily be [[Building_an_Off-Target_Test_App | built and executed]]. In every case, you can include a sample(s) simply by copying its source files to the SDK's [[Desktop_Installation#SDK | sample_src]] directory and rebuilding the testapp. | ||
The samples were created to be as simple as possible while sufficiently demonstrating the topic at hand. In particular, the samples are '''very light on core application logic (that is, the source under test)''' -- they focus instead on the code that leverages STRIDE to define and execute tests. As you review the sample code, if you find yourself confused about which code is the test logic and which is the source under test, try reading the source file comments to discern this. | The samples were created to be as simple as possible while sufficiently demonstrating the topic at hand. In particular, the samples are '''very light on core application logic (that is, the source under test)''' -- they focus instead on the code that leverages STRIDE to define and execute tests. As you review the sample code, if you find yourself confused about which code is the test logic and which is the source under test, try reading the source file comments to discern this. | ||
Line 8: | Line 8: | ||
In order to get the full benefit from the '''samples''', we recommend you do the following: | In order to get the full benefit from the '''samples''', we recommend you do the following: | ||
* follow the ''reference wiki links''' we provide in the main sample articles. These links provide rich technical information on the topics covered by the sample. These are also articles you will likely refer to in the future when you are implementing your own tests. | * follow the '''reference wiki links''' we provide in the main sample articles. These links provide rich technical information on the topics covered by the sample. These are also articles you will likely refer to in the future when you are implementing your own tests. | ||
* read/review all sample source code prior to running. The samples consist almost entirely of source code, so it makes sense to use a source code editor (one you are familiar with) for this purpose. | * read/review all sample source code prior to running. The samples consist almost entirely of source code, so it makes sense to use a source code editor (one you are familiar with) for this purpose. | ||
* build and execute the samples using the off-target framework. If you completed your installation as instructed above, it should be fully functional when you do the training. | * build and execute the samples using the off-target framework. If you completed your installation as instructed above, it should be fully functional when you do the training. | ||
Line 20: | Line 20: | ||
; [[C/C%2B%2B_Samples | test_in_c_cpp]] : These are samples that implement the test logic using native code that executes on target. This functionality is focused at developers interested in writing tests in c/c++. | ; [[C/C%2B%2B_Samples | test_in_c_cpp]] : These are samples that implement the test logic using native code that executes on target. This functionality is focused at developers interested in writing tests in c/c++. | ||
; [[Script Samples | test_in_script]] : These are the introductory samples for the STRIDE Framework that illustrate how to do expectation testing of instrumented source under test using script test modules on the host. | ; [[Script Samples | test_in_script]] : These are the introductory samples for the STRIDE Framework that illustrate how to do expectation testing of instrumented source under test using script test modules on the host. | ||
[[Category: Samples]] | [[Category: Samples]] |
Latest revision as of 21:13, 13 June 2011
Introduction
The samples are provided with with the Desktop installation package. They are self-documented (using doxygen or perldoc) and this content will be attached to the test report whenever a sample is executed. They are readily executable using our off-target (desktop) environment and can easily be built and executed. In every case, you can include a sample(s) simply by copying its source files to the SDK's sample_src directory and rebuilding the testapp.
The samples were created to be as simple as possible while sufficiently demonstrating the topic at hand. In particular, the samples are very light on core application logic (that is, the source under test) -- they focus instead on the code that leverages STRIDE to define and execute tests. As you review the sample code, if you find yourself confused about which code is the test logic and which is the source under test, try reading the source file comments to discern this.
What you need to do
In order to get the full benefit from the samples, we recommend you do the following:
- follow the reference wiki links we provide in the main sample articles. These links provide rich technical information on the topics covered by the sample. These are also articles you will likely refer to in the future when you are implementing your own tests.
- read/review all sample source code prior to running. The samples consist almost entirely of source code, so it makes sense to use a source code editor (one you are familiar with) for this purpose.
- build and execute the samples using the off-target framework. If you completed your installation as instructed above, it should be fully functional when you do the training.
- review the reports that are produced when you run the samples. The reports give you a feel for how data is reported in the STRIDE Framework. The extracted documentation is also provided in the report.
- For most samples, we provide some observations that help summarize aspects of the results that might be of interest to you. These observations are not necessarily comprehensive - in fact, we hope you'll discover other interesting features in the samples that we haven't mentioned.
Organization
The samples are a collection of native and script source code that demonstrate the techniques for creating and executing tests using the STRIDE Framework. The samples are grouped into two top-level directories:
- test_in_c_cpp
- These are samples that implement the test logic using native code that executes on target. This functionality is focused at developers interested in writing tests in c/c++.
- test_in_script
- These are the introductory samples for the STRIDE Framework that illustrate how to do expectation testing of instrumented source under test using script test modules on the host.