Jump to main content
Extend a base configuration context API
About this task
This procedure is followed by a detailed example with code that you can copy and paste
into Studio to form a working context API extension.
Procedure
-
Create new scenarios and feature files that specify new steps.
-
Create a new step class that provides step methods for the new steps.
-
Create a new context API interface.
- It must extend the existing interface. (For example:
AdminContext_Ext extends AdminContext)
- It must define the new methods that are being added to the base configuration
API.
-
Create a new context API impl.
- It must extend the existing impl. (For example:
AdminContextImpl_Ext extends AdminContextImpl)
- It must implement the new interface. (For example: implements
AdminContext_Ext)
- It must provide implementations for the new methods.
-
Modify ContextFactory.
- Add a new method that returns the extended context API. (For example:
AdminContext_Ext).
-
Modify ContextFactoryImpl.
- Inject the extended context API. (For example:
AdminContext_Ext).
- Add a new override that returns the extended context API. (For example:
AdminContext_Ext).
-
Modify the RemoteSmokeTestHelperModule class.
- Add code to bind the extended context API's interface to its impl.