Troubleshooting Object Test Bench

This topic describes the most common problems you can encounter working with Object Test Bench and a short description of how to solve the problem.

Object Test Bench does not appear in the IDE.

Cause: This is most likely the result of the mode you are currently running Visual Studio in.

Solution: Make sure that you are running Visual Studio in Design mode instead of Debug mode.

Cause:

  • The Object Test Bench menus do not display the function if the function takes a variable parameter argument.

  • Only the Invoke Static Method command is displayed for abstract classes.

Solution: Check that you are calling functions that Object Test Bench supports.

Object Test Bench is out of sync with my code.

Cause: The code has been edited, and now Object Test Bench displays a version that is no longer in sync with the code.

Solution: Rebuild to resync Object Test Bench. You will not be able to perform an object operation in Object Test Bench until you rebuild to refresh.

Note

Rebuilding the application can cause Object Test Bench to reset.

The object I added did not appear in Object Test Bench.

Cause: This most likely occurs because the object you tried to add is an instance of a generic class. This scenario is not supported in Object Test Bench.

Solution: Check that the object you want to add is not generic.

Cannot see the "create Instance" command when I right-click a class in Class View.

Cause: The project which contains the class on which Object Test Bench is being invoked might not be set as StartUp Project.

Solution: In Visual Studio, a project must be set as startup project before we can use OTB with it. In the Class view, right-click the project (which contains class you want to use with OTB) and click Set as StartUp Project.

See Also

Other Resources

Object Test Bench