Home | Actions The Action interface is used when setting up, running, and tearing down test cases. Each of these are a collection of actions, some validated (depending on the action type) and some not. Test action hierarchy Each action implements the Action interface, which is simply the method definition runAction(). The ValidatedAction is an abstract implementation of this interface that contains a collection of validators. If validators are present, then they are run after the child action is run. FormSubmissionValidatedAction This action is used for submitting a web form to a specific URL, with confiigured request data. This extends the WebSessionValidatedAction, for use by other web related actions for storing web conversations (per HttpUnit), web request, and web response data. A web conversation may be set via Spring, or initialized upon retrieval. See Sample FormSubmissionValidatedAction MethodInvocationAction This action makes heavy use of Spring's MethodInvokingFactoryBean. Simply use spring to define an object, and configure this action with that object, the method to invoke, and the arguments for that method. This also implements the MethodResultAction, which simply defines the getResults() interface. This interface is used by result validators for retrieving the result object to validate. See Sample MethodInvocationAction DBSetupAction This action makes use of DbUnit DataSets to perform db operations. Database connections use a Spring configured data source. Multiple database operations may be specified as part of the dbOperations list. Possible operations are:
If no data set wrapper is set, and a dataFilePath is specified, the ReplacementDataSetWrapper is used. This allows very simple DBSetupAction configuration by specifying only the path of the data file without having to worry about wrappers and such, while gaining default replacement values (see below). Current wrappers are:
WaitAction This action waits a configured number of milliseconds and is helpful, for example, when asynchronous actions need to complete. See Sample WaitAction |
hosted by |