Changes in Version 3.6.2 (2021-01-22)
Changes in Version 3.5.0 (2020-06-04)
Changes in Version 3.4.2 (2020-03-26)
Changes in Version 3.3.1 (2019-08-22)
Changes in Version 3.3.0 (2019-01-09)
Changes in Version 3.2.1 (2018-12-21)
Changes in Version 3.2.0 (2018-08-27)
Changes in Version 3.1.1 (2018-06-29)
Changes in Version 3.1.0 (2018-03-27)
Changes in Version 3.0.0 (2018-02-20)
Structuring your Code
In the previous chapters test suites, test classes and page objects are introduced. This chapter helps you to understand how to structure these test artifacts.
The Page Module
It’s recommended to have a specific Inclusion module which contains all page objects. This offers the possiblity to reuse these pages from different test/bootstrap modules.
In this module you have to add a dependency to tapir-page and the ui technlogy module you would like to use (e.g. tapir-selenium).
<dependency> <groupId>de.bmiag.tapir</groupId> <artifactId>tapir-page</artifactId> </dependency> <dependency> <groupId>de.bmiag.tapir</groupId> <artifactId>tapir-selenium</artifactId> </dependency>
Beside a class annotated by @ModuleConfiguration, you just need to declare your pages in a (sub-) package of the module configuration.
The Test Module
Your test suites and classes should be located in a dedicated module which depends on your pages-module. You need a @BootstrapConfiguration annotated class. Locate all your test suites and classes in a (sub-) package, so they are scanned automatically.
Inheriting from a tapir-starter module is the easiest way to get your dependencies and plugins into place.
Of course you could have as many modules as you would like to. Modularity is one of tapir’s key paradigms, so we encourage you to build reusable modules. These modules are similar to the page module explained above, but the dependencies might differ due to the module’s purpose.