An Action is a meaningful test function defined in a Context. For example, when you are on the QBank Login Page (Context), you may have possible Actions such as:
- Login to QBank
- Initiate forgot password
- Verify footer links etc.
Actions need not just be limited to UI-based interactions or verifications. For example, you may have an Action in the Account Summary Page, Get current balance from the database, which just retrieves the current balance for an account from the database. You may also have an Action that just invokes a Rest API and verifies the response.
Action is defined in a Context
An Action is defined as part of a Context. For example, QBank Login Page, Account Summary Page, etc. are considered “Owner” or “Origin” Contexts for respective Actions. An Action utilizes resources available from its owner Context.
Multiple Actions may be defined in a given Context and all such Actions share the resources such as Views, Elements, etc available in the Context.
What does an Action contain?
Action contains the “logic” or “statements” to achieve the test function. For example,
- Login to QBank Action will have statements to enter the user name, enter the password and click on the sign-in button.
- Initiate forgot password Action may have a statement to click on the “Forgot Password” link.
- Verify footer links Action may have multiple statements to verify the footer links in the QBank Login Page.
Statements may include UI interactions, UI verifications, non-UI commands such as connecting to a database, reading an email, or other logic control statements. Logic forms the crux of an Action.
Destination Context
When an Action is performed which includes statements for UI interaction, the application state may change. The destination Context of an Action indicates which page/Context the application will be in, after the completion of this Action.
For example, Login to QBank may lead the application to the Account Summary Page.
There are multiple options available for specifying the “Destination Context” of an Action. You will learn more about destination contexts in a detailed topic.
In the case of non-UI Actions, Destination Context may be ignored by marking the Action as "Library Action".
Action is used in a Scenario
A Scenario, which represents the use case you are testing on your application is formed by combining a series of Actions. An Action becomes a “Step” in a Scenario.
- An Action is “modular” in nature and “reusable” by definition.
- A Scenario is made up of a series of Actions and a given Action can be used in multiple Scenarios.
Some Examples
Example 1: Login to QBank
Comments
0 comments
Please sign in to leave a comment.