Partager via


IPostProcessor Interface

Interface of user customized processing

Namespace: Microsoft.SpecExplorer.ObjectModel
Assembly: Microsoft.SpecExplorer.ObjectModel (in Microsoft.SpecExplorer.ObjectModel.dll)

Usage

'Usage

Syntax

'Declaration
public interface IPostProcessor : IDisposable

Remarks

Spec Explorer can be extended to allow a customized implementation of test code generation. For example, instead of the default process of generating C# test cases from exploration results, a user-provided implementation could generate a system of XML files that represent the test sequence and test oracles. Such a customized implementation involves coding and compiling a DLL that exposes an object implementing the IPostProcessor interface. In implementing this Spec Explorer-declared interface, a public PostProcess method and a Description property are exposed. The DLL is then copied to a pre-defined Extensions folder in the Spec Explorer installation folder hierarchy. In that folder, Spec Explorer can discover such user-provided post processing DLLs. Multiple objects implementing IPostProcessor are supported in one post processor DLL. To ensure the proper discoverability of an IPostProcessor object, it must expose a constructor taking no parameter. The PostProcess method accepts a reference to a Spec Explorer transition system and does the work of customized test code generation.

With such user-provided DLLs in place, Spec Explorer can discover them and dynamically extend its menu system to allow selective invocation of the post processing. A given post processor object exposes a Description property whose get method returns the string used for an associated new menu item. These post processing menu choices are accessible via the context menu in the Exploration Manager. This pop-up menu is obtained by right clicking on a machine test suite entry. The context menu has a "Perform User Task" choice. This choice has a dynamically created sub menu containing the choices for the user-provided post processors. The menu items for those choices were obtained by Spec Explorer from the various post processor Description properties.

Platforms

Development Platforms

Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003

See Also

Reference

IPostProcessor Members
Microsoft.SpecExplorer.ObjectModel Namespace