Feature structure
Feature folders in Automation Testing (AT) project correspond to features within the application. Each feature deals with a specific set of responsibilities.
We will use the Users feature as an example to showcase the process of setting up a feature folder in AT project.
Inspecting the User section of the application, we can conclude it consists of three page objects:
Create New User modal window
User Management Page
User Page (or User Edit page)
We can create the Users feature folder inside the AT project, and add the following basic elements which every feature must contain:

1. Components
Components folder will contain page objects for pages within this feature. It can contain Controls subfolder containing custom controls used by the page objects.
Constants
contains all the selectors for page objects in this feature.
2. Tests
Tests folder contains all tests related to this feature.
Tests are separated into two subfolders: Parallelizable and NonParallelizable depending on how we structured tests to execute.
3. Pages
Pages
is a partial static class in which we define the pages related to that feature. We define this partial class in every feature folder so that feature pages are separated. In this example we can define the User Management page with:
public static UserManagementPage UserManagementPage()
{
return Go.To<UserManagementPage>();
}
and then load it when writing tests: Pages.UserManagementPage()
4. Setup Fixture
Many features will have a SetupFixture class defined, which is used to setup test data for that feature.
In this example, UsersSetupFixture
is used to create a test user before any tests are run, and to cleanup and delete that user when all tests in this feature finish executing.
Last updated
Was this helpful?