STRIDE 3.0.01xx: Difference between revisions
Line 515: | Line 515: | ||
**call srWin_SetMaster() to start the runtime thread, srThread, before calling srWin_Run(). Within a multi-process target, only one process (the master) calls this routine. | **call srWin_SetMaster() to start the runtime thread, srThread, before calling srWin_Run(). Within a multi-process target, only one process (the master) calls this routine. | ||
= Patch releases = | = Minor and Patch releases = | ||
== 3.0.0101 Patch "a" == | == 3.0.0101 Patch "a" == | ||
* Linux version of the STRIDE [[Build Tools]] is officially introduced. | * Linux version of the STRIDE [[Build Tools]] is officially introduced. |
Revision as of 18:36, 7 October 2008
Release Notes
This page documents the changes in STRIDE version 3.0.01xx (code name StoneSteps).
Please review this information before upgrading from an earlier version.
Note that if you are upgrading from a previous installation you must uninstall your existing STRIDE before installing version 3.0.01xx. |
What's New
Based on customer feedback, in this release we have made significant performance improvements as well as many key usability improvements and bug fixes.
Performance Improvements
Specific improvements have been made in the following areas:
- Database loading time has been improved
- Compile times are now shorter
- Scripting operations involving function and message payloads now perform better, especially when arrays are involved
- Runtime performance has been improved by optimizing payload serialization and deserialization operations
Usability Improvements
SCL Wizard
The SCL Wizard functionality in STRIDE Studio has been extended so that you can now use the tool to qualify message payloads as well as function payloads.
In addition, the following types of qualifications can now be made:
- For payloads that include function pointers, the SCL Wizard now supports qualifying the pointers as such and identifying candidate function values
- Type casts can now be specified on payload members
Connection Management
Connection management has been greatly simplified; software managing connection to the target system has been integrated into STRIDE Studio so that connections can be managed directly from there. (It is still possible to access connection management functionality without using Studio.)
The Panel program is no longer used, and there is no longer a requirement to load the database to communicate with a remote target.
Transport Properties
All transport properties can now be accessed via scripts. A new transport scripting model makes this possible.
STRIDE Studio Test Runner Improvements
The test runner in STRIDE Studio has incorporated several functional and usability improvements.
- Each runnable script and folder (Suite) in a workspace now has additional properties that allow you to optionally specify a handler script that will be executed in the case of an unhandled error (property OnError) or a timeout (property OnTimeout). A timeout value can be set for each folder.
- Each runnable folder (Suite) in a workspace now has a property (OnRunConnect) that can instruct STRIDE Studio to automatically connect to a target system before the folder is executed.
- The workspace now has a dynamic property (ExecutionState) that allows you to alter the order of script execution at runtime.
New Frameworks Feature
This version introduces Target Frameworks, which provide customizable templates for workspace creation. The use of frameworks simplifies the use of STRIDE and ensures consistency across a development team.
Several reference frameworks are included in this release, supporting the following target environments:
Packages are also introduced. These provide a convenient way to encapsulate SCL-annotated source code and corresponding tests for a set of interfaces.
Uploading Results to STRIDE Portal
Uploading test results from STRIDE Reporter to STRIDE Portal has been integrated into STRIDE Studio. Portal's server information can be configured from Studio's workspace properties while uploading results to Portal can be enabled or disabled via workspace context menu. If enabled, after running the workspace, a script folder or a script file, results in Report file will automatically be uploaded to the configured server.
Build Tools
A set of new command line Build Tools has been implemented:
- Stride compiler
- Stride database binder
- Stride instrumantation generator
These utilities has been ported for Windows and Linux. Using them would allow seamless integration with "make" like build environment.
Target-Based Testing
Target-based (xUnit-style) testing has been simplified. The new set of SCL pragmas Test Units can now be included in a source file to tell the compiler and IM generator to automatically create test harnessing code.
The automation components STRIDE.testclass, STRIDE.testunit and STRIDE.testfunction are removed.
Runtime/PAL
Based on customer requirements, in this release we have made significant changes to STRIDE Runtime and PAL.
Multi-Process Targets
New routines and support have been added to Runtime and PAL to support multi-process target. Changes include implementation of memory management and shared memory, protecting using named Mutex objects, synchronization of multiple processors and multiple threads, and usage of current process and thread IDs.
Logging (Optional)
Runtime and PAL use a logging routine that can optionally be implemented in PAL.
Windows Off-Target SDK
A new SDK for implemention of Off-Target applications on Windows has been packaged. It contains a library (s2srWin.dll/lib) in which the Windows PAL, Runtime, and GRS and a set of utility scripts are prebuilt.
The s2shostapphrt library, a prebuilt verion of the Host Runtime, has been removed. Building Windows applications using the Host Runtime is not supported anymore. The s2shostapptrt library, a prebuilt version of the Target Runtime, has also been removed.
If an upgrade is performed it is strongly recommended that the above mentioned s2shostapp* libraries and their public API header (hostapp.h) be manually removed.
Support Wiki
This support wiki http://support.s2technologies.com is introduced with this version. You can navigate here from your web browser, or directly from STRIDE Studio; a link is provided in the Help menu.
STRIDE Samples
We have created a set of sample workspaces to aid in the evaluation of STRIDE, or as a tool for learning how to apply STRIDE to different testing scenarios.
If you're new to STRIDE, or want to learn more about using the product, this is a great place to start.
Acquiring the Software
You can download the latest release from the S2 Technologies ftp site: ftp://ftp.s2technologies.com
To run STRIDE you will need a license. If you are not yet a customer of S2 and would like to obtain an evaluation license, email S2 Sales or call our offices at 760-635-2345.
Installing the Software
To install STRIDE for the first time, or as an upgrade to an existing installation, please refer to Host Installation.
Note that if you are upgrading from a previous installation you must uninstall your existing STRIDE before installing version 3.0.01xx. |
If you are new to STRIDE, we recommend that you investigate the New STRIDE Samples.
Change Details
- The ascript API has been changed to be more robust:
- Certain deprecated methods have been eliminated.
- Some existing methods have had their APIs modifed.
- The event model has been improved to allow greater script control.
Note: Some scripts must be modified from previous versions of STRIDE to work successfully with 3.0.01xx. The necessary changes are detailed in the Migration to 3.0.01xx section below.
- The Panel object is no longer available to scripts; its functionality has been moved under the studio object model. You can access this new functionality as studio.Connection, however if you were formerly scripting the Panel object, you may find it is no longer necessary since:
- You can now configure your connection properties from within STRIDE Studio (from the menu select Tools/Target Connectivity)
- You can now set a workspace folder property to autoconnect upon execution
- Zero is now allowed as the maximum size under certain circumstances in scl_string and scl_ptr_sized. Details of these circumstances are contained in the SCL Reference Guide document, refer to Online Help.
- studio.Workspace.Compiler.MicrosoftCompatibility has been replaced with studio.Workspace.Compiler.Compatibility. Valid values are "Generic" (generic mode), "Microsoft" (Microsoft compatibility), or "Gnu" (Gnu or Gcc compatibility).
- studio.Workspace.Compile() has been replaced with studio.Workspace.Build(). Also new methods, studio.Workspace.CleanBuild() and studio.Workspace.ReloadDatabase(), have been added.
- A new property, Output, has been added off the studio object. This property outputs text to the Studio message tab, similar to how ascript.MessageBox() works for certain scripts. This property contains one method, PrintMessage(String msg). You can see an example of its use here.
- A new settings group has been introduced - studio.Workspace.Settings.Build.
- studio.Workspace.Intercept.Path has been replaced with studio.Workspace.Intercept.SourcePath and studio.Workspace.Intercept.HeaderPath.
Fixes
This section describes defects which have been corrected in STRIDE and the customer tracking number associated with them, if any, in brackets [].
- [1055] Not able to specifiy uppercase include directory
- [1163] Certain cases of array of pointers to discriminated unions that were not handled correctly in the ascript object have been fixed.
- [1357] The ascript Call() method, when used with RspTimeoutPeriod, only returns True if a timeout has occurred.
- [1469] Global casting using scl_cast no longer causes an intercept module compile error.
- [1539] ascript no longer returns "undefined" when calling function.ReturnValue when the captured function returns an unqualified function pointer.
- [1543] IM source file locations added to studio UI and automation
- [1564] The Studio Add files dialog has been increased from 2K bytes to 100K bytes, to allow for more files to be selected at a time.
- [1586] Support for Variadic Macros
- [1597] EDGFront crash for scl_ptr_opaque
- [1600] Pre-processor treats constant 1 always as 8-bit
- [1605] Generated Perl script generates error when run in debugger
- The following statement in Runtime files srtest.c and srtest.cpp has been changed:
va_list args = 0;
is now
va_list args;
with no initializer. This makes it portable and able to compile under Linux. - A macro that determines the existence of vsnprintf() has been updated in srtest.c and srtest.cpp in order to make it able to compile with GCC and other non-Microsoft compilers.
Note: If you are using test functions and C++ test classes, you must be using compilers that support vsnprintf (variable argument lists), which is a standard in C99 and supported in C90. - When tracing on a STID it's possible to display trace information for messages that aren't captured (i.e. the message's SMID is not known to STRIDE). A problem could occur when STRIDE attempted to interpret the payload of these messages. This has now been fixed; hex values only are now shown in the trace view for in this situation.
- Autosense was not working properly in the editor for message payloads. This has been fixed.
AutoScript
TestUnits Collection
A new TestUnits collection has been implemented. All test interfaces (specified with Test Unit pragmas) will be listed there.
Functions Collection
Interfaces specified with either the scl_test_class or scl_test_flist pragmas are not listed in the Functions collection anymore.
PAL
Memory Management
To support multi-process target, memory management support for dynamic, configurable, and internal static memory has been implemented in Runtime. Runtime makes PAL calls to acquire memory segments and manages the memory according to runtime configurations set by user. In case of multi-process target is enabled, these memory will be shared among multiple applications, and PAL should implement shared memory.
Protection using Mutex
Runtime now uses named mutex objects to protect critical data from multiple and simultaneous accesses by multiple threads and, in case of multi-process target is enabled, by multiple applications. Runtime makes PAL calls to obtain and control mutex objects.
New Routines
- Memory Management
In case of multi-process target, recommended approach is to use Memory-Mapped Files to implement memory segments.
palMemSegmentOpen() - Open/create memory segment palMemSegmentClose() - Close memory segment
- Named Mutexes
palMutexInit() - Initialize a mutex object palMutexDestroy() - Destroy a mutex object palMutexLock() - Lock a mutex object palMutexUnlock() - Unlock a mutex object
- Task Synchronization
palGetThreadId() - Get current thread Id palGetProcessId() - Get current process Id palSleep() - Suspend the execution of the current thread
- Logging
This is optional.
palLog() - Logging utility
Updated Routines
- Function signatures and functionalities of palWait() & palNotify() have been updated.
palWait() - now takes in an in/out pointer for events notification palNotify() - mail box Id has been updated to notify any event including mail box Ids.
- Function signatures of palMemAlloc() & palMemFree() have been updated.
Removed Routines
palProtect palUnprotect palCriticalErr
Removed Modules
S2Mem - Memory module provided as part of PAL has been removed. If native OS does not support dynamic memory, Runtime's memory management module srMem can be used instead of S2Mem.
Runtime
- STRIDE Host Release 3.0.01xx is compatible with the Runtime Version 3.00.
- In order to eliminate redundancy and promote an object-oriented design, "Member Methods" have been removed from srTest; only "Member Objects" exist now in srTest. In addition, accessing the functionality of Member Objects in this way is similar to accessing scripting objects through the STRIDE Reporter object model. For a detailed explanation, refer to this article on the STRIDE Support Wiki.
- A new routine, srInit(), replaces deprecated srInitialize(). Now the target will not be able to set an auto-connect with timeout.
- The scl_tp and scl_tp_format pragmas have been deprecated. The new pragmas are scl_tracepoint and scl_tracepoint_format.
- The default runtime configuration in srcfg.h now has fragmentation turned on. The srCFG_MAX_TRANSPORT_UNIT is set to 2048.
- Fixed warnings for parameter name differences in function declarations and definitions for srSubscribe(), srTracePoint(), and srQuerySMID().
- Removed unnecessary/extra response to srCONNECT_CLOSE_T_SMID message.
- The Runtime now checks for the connection before responding with a "Pong" upon receiving a "Ping."
- Introduced 40 additional system trace points to better describe internal errors.
- Reporting of the error srERR_SUB_NONE has been suppressed so that it no longer generates a target trace error.
- Trace views now always display srTraceStr() with reserved STID (srSTID_RESERVED) regardless of trace filter settings.
- srPtrSetupChild() now accepts NULL for handle (out pointer - pwHandle).
- Added a new Runtime Test Services (RTS) API srTestCaseSetStatusEx(), which enables the providing of the actual return value of a numeric test method in the case of failure.
- Added two new public APIs - "Printing" APIs to display messages on Trace Views without having to specify a STID or a trace level and to set any trace filters on Trace Views. These routines support formatted strings with variable arguments. The srPrintInfo() will show as srTraceStr() with STID=0 and Level=3. The srPrintError() will show as srTraceStr() with STID=0 and the Level=1. Warning: These new APIs use vsnprintf() routine to process variable arguments. The vsnprintf() became a standard in C99 and is supported in C90.
- To support multi-process target, significant changes have been made to runtime.
- A new public routine, srUninit(), has been added to sr.h & srapi.c.
- A new public routine for Runtime Thread exit point, srThreadUninit(), has been added to sr.h & srthread.c.
- A new module, srMem, for Memory Management has been added. Its new routines, _srMem_Allocate() & _srMem_Free(), will be used in PAL's palMemAlloc() & palMemFree() in case of multi-process target is enabled.
- Calls to palProtect() & palUnprotect() have been replaced by new routines _srProtect() & _srUnprotect(), in which the implementation uses its own mutex object that calls PAL's mutex routines.
- In target Test Classes and Test Functions, added capability to specify the comment label in srTestCaseAddComment() and AddComment() APIs.
- Fixed a potential data abort issue when executing delegate code in the IM prior to Runtime being initialized.
- Runtime Test Services APIs are now thread safe.
- Fixed cancelation of remote boadcast subcribtion goes in an infinite loop.
- Fixed Runtime resource abuse when sending lots of broadcast messages.
- Added partial check for message payload corectness.
- The following Runtime files have been modified:
sr.h srapi.c srapi.h srapirgl.c srapirgl.h srcfg.h srconn.c srconn.h srerr.c srib.c srib.h sribctrl.c sribtr.c sribtr.h srmsgmar.c srmsgptr.c srmsgptr.h srmsgque.c srmsgque.h srmsgrt.c srmsgrt.h srmsgsub.c srmsgsub.h srstid.c srstid.h srsuid.c srsuid.h srtest.c srtest.cpp srtest.c srtest.h srtestutil.c srtestutil.h srthread.c srthread.h srtime.c srtime.h srtp.h srutil.h
- The following Runtime files have been added:
srmem.c srmem.h
Migration to 3.0.01xx
Recommended steps for migration from a previous version:
AutoScript
Any use of test classes through the Functions collection, like:
$main::ascript->Functions->Item("my_test_class")->User->Call();
should be converted to use the new TestUnits collection:
$main::ascript->TestUnits->Item("my_test_class")->Run();
API Changes
- The Support Wiki pages now contain reference help for AutoScript. The content has been updated to reflect the API changes, for details see the AutoScript API Reference.
- All synchronous method calls now throw exceptions in order to indicate error conditions rather than have error conditions encoded in return values.
- Asychronous method calls never throw exceptions to indicate error conditions. Instead, error conditions are delivered as a new Error object that is returned to ascript.WaitForEvent(). (Asynchronous methods are function.Owner.Return(), function.User.CallNonBlocking(), function.User.CallBypassOverrideNonBlocking(), message.Owner.Broadcast(), message.Owner.SendRsp(), message.User.SendCmd(), and message.User.SendCmdBypassOverride())
- If ascript.WaitForEvent() times out, an Error object is returned. Previously NULL was returned in this case.
- All objects returned by ascript.WaitForEvent() have Type and Name properties. When the Type is “Error”, the Error object has additional properties that contain further details about the error.
- All existing script syntax for designation of message payloads has been deprecated. A new syntax that allows for greater expression has been adopted. Details can be found here. There are no syntax changes to function payloads.
- The signature for ascript.Initialize has been changed. Successful calls to ascript.Initialize now fully initialize the object.
End-Of-Lifed Methods and Properties
The following have been End-Of-Lifed (EOL'd). A call to any of these methods or an access to any of these properties will now result in a not-implemented exception in the script making the call or access.
- ascript.Quit()
- ascript.Interfaces
- ascript.NamedEvents
- ascript.WaitForEventWithTimeout
- ascript.RspTimeoutNotifyEnabled
- ascript.CreateTimer()
- ascript.DestroyTimer()
- ascript.WaitTimeoutNotifyEnabled
- ascript.Compare_As_C_Values()
- ascript.AsyncErrorNotifyEnabled
- ascript.Function.Item().User/Owner.SMID
Recommended Steps for Migration From a Previous Version
- Search for calls to ascript.WaitForEvent() in all scripts. Previous logic to test for null indicating timeouts must be modified. WaitForEvent() now always returns an object, in the case of a timeout (or other error) an Error object is returned.
- Search for calls to ascript.Quit in all scripts. Modify the logic as necessary to exit the script by other means in place of the original Quit() call.
- Search for all asynchronous method calls (Asynchronous calls are limited to function.Owner.Return(), function.User.CallNonBlocking(), function.User.CallBypassOverrideNonBlocking(), message.Owner.Broadcast(), message.Owner.SendRsp(), message.User.SendCmd(), and message.User.SendCmdBypassOverride()). Modify the logic as necessary to call ascript.WaitForEvent() if errors (including timeout error) should be detected.
- If you have scripts that explicitly instantiate an ascript object (i.e. they create an object using the "STRIDE.ascript" PROGID), search for all occurrences and modify the subsequent call to ascript.Initialize() to pass the new parameter set.
- Search for all EOL'd methods and properties. Each can be replaced by setting the appropriate timeout property and handling the timeout error object delivered by WaitForEvent.
EOL’dMethod or Property |
Recommended Replacement |
ascript.Quit() |
Refactor script logic to exit the script by other means. |
ascript.Interfaces |
Use ascript.Functions or ascript.Messages as appropriate. |
ascript.NamedEvents |
Contact S2 Technologies |
ascript.WaitForEventWithTimeout |
Use ascript.WaitForEvent() after setting desired timeout using ascript.WaitTimeoutPeriod |
ascript.RspTimeoutNotifyEnabled |
No longer needed. Timeout notifications are performed by returning an Error object from ascript.WaitForEvent() |
ascript.CreateTimer() |
Use ascript.Timers.Add() |
ascript.DestroyTimer() |
Use ascript.Timers.Remove() |
ascript.WaitTimeoutNotifyEnabled |
No longer needed. Timeout notifications are performed by returning an Error object from ascript.WaitForEvent() |
ascript.Compare_As_C_Values() |
Contact S2 Technologies |
ascript.AsyncErrorNotifyEnabled |
No longer needed. Error notification from asynchronous calls is performed by returning an Error object from ascript.WaitForEvent() |
ascript.Function.Item().User/Owner.SMID |
Use ascript.Function.Item().User/Owner.SUID |
PAL
Please refer to Platform Abstraction Layer (PAL) Specification for detailed information on new APIs. You may also refer to Linux implementation of PAL, which has been updated with new routines.
- Implement new shared memory routines, palMemSegmentOpen() & palMemSegmentClose(). In case of multi-process target, these routines should implement shared memory using memory-mapped files.
- Runtime now can manage dynamic, configurable, and internal static memory. In case of multi-process target, update palMemAlloc() to simply call _srMem_Allocate() and palMemFree() to simply call _srMem_Free(). In case of single-process target, you can simply allocate dynamic memory according to your Operating System. If you are upgrading, you can simply leave the current implementation as it is.
- Implement new mutex routines, palMutexInit(), palMutexDestroy(), palMutexLock() & palMutexUnlock, to handle any named mutex objects. It is recommended to implement a separate code for shared memory case if it is necessary.
- Remove old routines palProtect(), palUnprotect() and palCriticalErr().
- Implement new routines palGetThreadId() and palGetProcessId().
- Implement new routine palSleep().
- Update synchronization routines, palCreateNID(), palDeleteNID(), palWait() & palNotify(), to support event notifications and in case of multi-process target is enabled, sharing of the synchronization objects among multiple processors.
- If your PAL uses S2Mem routines for dynamic memory, you should use new Runtime module srMem. Update palMemAlloc() to call _srMem_Allocate() and palMemFree() to call _srMem_Free().
- Optionally, implement new routine palLog() as a logging utility for PAL and Runtime.
Runtime
- Edit srcfg.h file to configure the new memory management (srCFG_MEMORY_MANAGEMENT) and multi-process target (srCFG_MULTI_PROC_TARGET) settings. By default, memory management and multi-process target are disabled. If you enable multi-process target you also need to enable memory management and configure the sizes and the maximum number of memory blocks. New Runtime module srMem uses these configurations to allocate and manage memory segments.
- Edit srcfg.h file to configure the new target connection timeout setting (srCFG_CONNECTION_TIMEOUT).
- If target Test Classes and Test Functions are used, change the signature to include test label in srTestCaseAddComment() and AddComment() APIs.
Windows Applications using Windows Off-Target SDK
- The new s2srwin.lib has public API, published in a header srwin.h, containing the following set of routines:
srWin_SetMaster() - Sets the application as the master and initializes the Stride Runtime thread. In a multi-process environment only one application should make this call. srWin_AddThread() - Adds additional message processing threads to the application. srWin_Run() - Starts the processing and will not return until it has been signaled via keyboard key or CTRL-C. srWin_SetPortTCP() - Overrides the TCP port number (default: 8000) to which the application will bind for the purpose of accepting connections. srWin_SetPortSerial() - Overrides the COM port number (default: 1) to which the application will bind for the purpose of accepting connections.
- Existing Host Apps developed against the old hostapphrt and hostapptrt libraries should be updated to as follows:
- replace the include of hostapp.h with include of srwin.h
- replace all calls to HostAppXXX() with srWin_XXX()
- call srWin_SetMaster() to start the runtime thread, srThread, before calling srWin_Run(). Within a multi-process target, only one process (the master) calls this routine.
Minor and Patch releases
3.0.0101 Patch "a"
- Linux version of the STRIDE Build Tools is officially introduced.
- Fixed several minor issues in STRIDE Studio.
3.0.0101 Patch "b"
- Relaxed scl_cast() pragma to allow cast from any integral ptr to union of ptrs
- Fixed compile warnings in Linux PAL.
- Fixed issue in instrumentation of Test Units.
- Fixed issue with UNC paths.
- Fixed several minor issues in STRIDE Studio.
3.0.0102
- Implemented new licensing schema.
- The syntax of scl_ptr and scl_ptr_sized pragmas has changed. Now it is required to quote the direction and usage attributes.
- Runtime Test Services now support adding annotations per test suite.
- A complete set of Samples has been implemented.
- Fixed several minor issues in STRIDE Build Tools.
- In STRIDE Studio the processing of Trace information has been optimized.
- Fixed several minor issues in STRIDE Studio.
- Fixed several minor issues in AutoScript.
- The following Runtime files have been modified:
srconn.c srtest.c srtest.cpp srtest.h