Companions must be explicitly declared to DevTest at startup so that the authoring framework can make the companion available for use in test cases.
Like the Native Test test step, three classes are required for companions, but DevTest provides default implementations for the two classes that are not documented here. The default controller is com.itko.lisa.editor.CompanionController and the editor is named com.itko.lisa.editor.SimpleCompanionEditor. Notice that the built-in companion named Set Final Step to Execute Companion is defined with these classes. Use the registration for that companion as a sample. They are connected in the lisaextensions file.
companions=com.mycompany.lisa.AllowedExecDaysCompanion com.mycompany.lisa.AllowedExecDaysCompanion=com.itko.lisa.editor.CompanionController,com.itko.lisa.editor.SimpleCompanionEditor
For more information about the lisaextensions file, see Extending DevTest Solutions.
As with all custom test elements, you must make the classes that you have developed and the lisaextensions file available to DevTest. The most common way to do make them available is to put a JAR file in the LISA_HOME\lib directory.
Note: A custom companion can implement the StepNameChangeListener interface and can receive notification when the name of any step is changed. An SDK developer implements this if your custom companion renders a drop-down list of the steps in the test. An example is the Final Step to Execute companion, which lists the step names so a test author can select the teardown step. This code change was added to enable notifying the Final Step to Execute companion when a step name changes.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|