Awesome
Steward example project
This is an example project showing usage and extensibility of Steward, a PHP tool for Selenium WebDriver functional testing.
As an example, the tests are run in Firefox and Chrome browsers in Docker images running on GitHub Actions, but also in Microsoft Edge using Sauce Labs cloud service (see Sauce Labs build status.
What is shown in this example project
- Custom
AbstractTestCase
class as a common ancestor of all custom tests (defining eg. default browser size) - Overloading of the default browser size in one test (which tests responsive mobile version of a site)
- Component
TitlePage
(extendingAbstractComponent
) as an implementation of page object pattern - Usage of Steward's syntax sugar methods (
findByCss()
,waitForCss()
etc.) - Defining time delay and dependency between tests
- Storing data in one test-case and loading them in other using the
Legacy
component Log()
,warn()
anddebug()
methods- The
@noBrowser
annotation used when you don't need the browser interaction at all - How to run tests in headless mode (in both Firefox and Chrome)
- Configuring GitHub Actions to run Selenium hub with Chrome and Firefox nodes.
- Specifying custom capabilities using
--capability
option - Custom capability resolver for more complex capability definitions
- Applying conditions based on current configuration (eg. environment name) retrieved from ConfigProvider
What is missing so far
- See open issues for some other Steward features not yet shown in this example project.