Running and Publishing the TestIntro Sample: Difference between revisions
Line 83: | Line 83: | ||
<references/> | <references/> | ||
[[Category: | [[Category:Installation]] | ||
Revision as of 16:29, 2 June 2010
Building Instrumented Source Under Test
In this step, will will add a set of sample tests that provide an overview of STRIDE testing techniques. The Test Intro Sample tests are described in the linked article.
To begin, be sure that TestApp is not running, then copy the .c and .h files found in Samples/test_in_c_cpp/TestIntro to SDK/Windows/sample_src (or SDK/Linux/sample_src for Linux).
Once the files have been copied to sample_src, simply build TestApp as described in here.
Running Test Intro Samples and Publishing Results to Test Space
Note: To successfully publish results you are required to create a test space called TestIntro. Refer to Test Space Setup for more information.
Here we will run all tests in the TestApp.sidb database.[1]
- Run the build above TestApp in a console window.
- Invoke stride in a separate console window (different from the running TestApp) -- as shown below and verify Summary results.
Here are the command line parameters that we will submit to stride
--database ./out/TestApp.sidb --device TCP:localhost:8000 --upload --testspace https://USER:PASS@mycompany.stridetestspace.com --project Sandbox --space TestIntro
A couple of things to note:
- You will have to replace USER:PASS with your S2-assigned TestSpace user name and password
- You will have to replace mycompany with your S2-assigned subdomain name
- The project "Sandbox" and TestSpace "TestIntro" have been pre-created within your company STRIDE TestSpace
The command line is very long, so we'll want to create a text file named RunTestIntro.txt in the SDK\Windows (or SDK/Linux for Linux) directory as an option file to submit to stride.
If you haven't done so already, start TestApp running in a separate console window.
Now run stride as follows (starting from the SDK\Windows or SDK/Linux directory):
stride -O RunTestIntro.txt --run="*"
The output should look like this:
Loading database... Connecting to device... Executing... test units "s2_testintro_cclass" > 1 passed, 1 failed, 0 in progress, 0 not in use. test units "s2_testintro_flist" > 2 passed, 1 failed, 0 in progress, 0 not in use. test units "s2_testintro_testdoubles" > 3 passed, 0 failed, 0 in progress, 0 not in use. test units "s2_testintro_testpoints" > 3 passed, 0 failed, 0 in progress, 0 not in use. --------------------------------------------------------------------- Summary: 9 passed, 2 failed, 0 in progress, 0 not in use. Disconnecting from device... Saving result file... Uploading to test space...
Viewing Results in Test Space
First navigate to the S2-provided TestSpace with your browser. The URL has the form: https://companyname.stridetestspace.com. On the page that is presented, enter your login credentials.
At the top of the next page, click on the All Projects link to view the status of existing projects. Here you should see the Sandbox project listed, with its contained TestSpace TestIntro shown.
Clicking the TestIntro link will present you with the TestIntro TestSpace page. From the top-line results at the bottom of the page you can drill down into the Sequence_1 results to see the test details.
Analyzing the Results
At this point, we recommend that you take some time to review the techniques used in the TestIntro sample tests and correlate the results shown in Test Space with the various STRIDE constructs in the sample source. The article Test Intro Sample describes the tests in detail.
The following articles will be helpful in your analysis:
- ↑ Note that the S2 diagnostic tests are treated separately, and are not run unless the --diagnostics option is specified to stride.