BDDStack Terminology Structure of Code - bcgov/common-service-showcase GitHub Wiki

Key terminology:

Term Description
Page Web Page that your test will interact with. The page file will contain the definitions for the page. The pages files are stored at src/test/groovy/pages
Base Page The base page contains all definitions that are common for all pages. We do derive our new pages from the base page class. The base page is stored at src/test/groovy/pages/base
Spec Or Specification, this contains your BDD specifications (Feature & Acceptance Criteria) and is located at src/test/groovy/specs
Module Modules are definitions of page content that can be found in multiple pages, the files are stored at src/test/groovy/pages/modules
Trait A trait is a reusable set of methods and fields that can be added to one or more classes. We used them for inclusion of our utility functions. The files are stored at src/test/groovy/specs/traits
BASEURL An environment variable set to point to our server. Can be set in your private .env file.
GEBCONFIG Your Geb configuration file, you will find it at /src/test/resources.

Code Structure:

BDDStack (root)
├───gradle
└───src
    ├───main
    │   └───groovy
    │       └───listeners
    └───test
        ├───groovy
        │   ├───pages
        │   │   ├───app
        │   │   │   ├───base
        │   │   │   └───modal
        │   │   ├───external
        │   │   └───modules
        │   └───specs
        │       ├───base
        │       └───traits
        └───resources
            └───META-INF
                └───services