Studio:Interfacing Sample
Introduction
The following content relates to the sample files and workspaces installed in %STRIDE_DIR%\Samples\Scripting\AutoScript. This sample consists of a Visual Studio workspace for building an off-target simulator, sample source code, and a STRIDE workspace for sample code execution.
Getting Started
To begin, open the Visual Studio Solution file in the sample directory. This solution (and corresponding project) were created for Visual Studio 2005. If you have a later version of Visual Studio installed, you should be able to open this solution and it will be automatically upgraded if necessary. If you do not currently have any version of Visual Studio, we recommend that you install the current free version of Visual Studio Express.
Once you have successfully opened the solution, rebuild it. The build process has custom STRIDE build rules integrated and will produce a STRIDE database, intercept module source files, and an off-target simulator application that incorporates the sample source code.
Once the build is complete, perform the following steps to run the sample scripts in the workspace:
- launch the off-target simulator, Ascript_Samples.exe. This will run in a standard console window.
- open a command prompt window and change to this sample's directory.
- at the command prompt, run the command WorkspaceRun.pl -x setup -x teardown. This will execute all of the sample test scripts in the workspace and displays the results. You may open a browser and display the report written to the Ascript_Samples.html file in the sample's directory .
- quit the Ascript_Samples.exe application by typing 'q' in its console window.
Sample Tests
Now that you have built the off-target simulator and executed the scripting samples, you can take time to peruse the sample source and the corresponding results that each produces. This section provides a brief description for each.