|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Object Test Bench
Object Test Bench (OTB) is designed for simple object-level testing. Use OTB to create instances of your project's objects, invoke methods, and evaluate the results. This way, you shorten the task of coding, debugging and re-coding. Visual C#, Visual Basic and Visual J# support testing methods in OTB. OTB includes a tool window and a collection of dialog boxes for interacting with and manipulating objects displayed in Class Designer or in Class View.
Class Designer is available only in the Professional and Enterprise versions of Visual Studio.
Use OTB for the following tasks:
Teaching object-oriented programming concepts without going into language syntax.
Providing a lightweight testing tool designed for academic and hobbyist programmers to use on small and simple projects.
Shortening the write-debug-rewrite loop.
Testing simple classes and their methods.
Discovering the behavior of a library API quickly.
Object Test Bench is connected to other Visual Studio windows by a set of object operations, available when you right-click objects in Class View. These object operations include Create Instance and Invoke Static Method. When you instantiate an object or invoke a method, the Object Test Bench window displays the object instance. For more information, see.
Object instances appear in the Object Test Bench tool window as shapes. You can inspect an object and invoke its methods by right-clicking it and using the shortcut menu.
Object Test Bench works only on the StartUp project in the solution or in a referenced assembly. Only one instance of Object Test Bench exists for every Visual Studio instance.
Use Object Test Bench to invoke methods of classes in the.
In This Section