Page Model Tools 0.8.5 has been released to maven central under group id: org.pagemodel.
Quickly build maintainable and reusable Page Object Models to describe your web application.
- Pagemodel language to easily define the pages of your website.
- Pagemodel generator to generate page object model java classes from your pagemodel files.
.pagemodel examples | .pagemodel syntax
Writing tests is easy and easy to learn. Page models provide a complete chaining API. Testing tools and methods are easy to discover as auto-complete guides you through writing tests.
- Consistent testing api across all elements of all pages of all applications.
- Fluent api for your website uses auto-complete to guide you through testing.
Use the project generator to create a Java Gradle project for testing your application. Create a project and get started right away. Your project will be setup following best practices for configuring testing environments, loading test values during test setup, managing browsers to support parallel testing.
- Create a new testing project with a single command.
- Creates a consistent testing project structure across different applications.
- Publish page models to maven and re-use in other testing projects.
Test against any local or remote browsers. Easy to configure different browser environments with no hassle. Run tests using a headless browser in docker for easy pipeline integration.
- Target different test data sets and test environments.
- Target different local or remote browsers with specific capabilities.
- Web drivers are managed to support running tests in parallel.
- Docker images to easily run tests in a build pipeline.
Development of the Page Model Tools project happens across the pagemodel testing engine and the pagemodel java generator leaving the pagemodel language and testing api stable. Updating to newer versions of Page Model Tools do not require changes to your pagemodels or tests, update the pagemodel version and your page models will be regenerated and updated to use the new version.
- Java 8 JDK with JAVA_HOME set
- Web browser or Docker
- download org.pagemodel.gen.project-0.8.5.jar
- run the jar to generate a new project
- run the sample tests in your project
- see project structure for an overview of the project files
- see Page Model Examples for more about the .pagemodel files
- see Page and Element test meafter building the sources, get the built thods for an overview of test methods provided by the api
- download DemoProject-0.8.0.tar.gz for a complete example project using https://demoblaze.com with a step-by-step git history of creating it.
java -jar org.pagemodel.gen.project-0.8.5.jar XYZ com.example ./XYZTests/
cd XYZTests
./gradlew --rerun-tasks test --console=plain
java -jar org.pagemodel.gen.project-0.8.5.jar XYZ com.example XYZTests
cd XYZTests
gradlew.bat --rerun-tasks test --console=plain
XYZTestSanity/src/test/resources/profiles.xyz.json
XYZPageModels/src/main/resources/pagemodels/
See Page Model Examples for more about the .pagemodel files.
./gradlew --rerun-tasks XYZPageModels:build
gradlew.bat --rerun-tasks XYZPageModels:build
./gradlew --rerun-tasks XYZTestSanity:test --console=plain
gradlew.bat --rerun-tasks XYZTestSanity:test --console=plain
Page Model tools adds testing tools for Email, SSH, and Accessibility testing for comprehensive end-to-end testing. These tools are needed for testing many workflows, but missing in other web testing toolsets.
Fetch emails for account registration code. Fetch automated emails to test the content and styling. Send emails to test auto-reply emails or other email workflows.
Use .testMail()
or Mail.testMail(context)
to begin mail testing.
Many things needed to test on a server are not available through a web UI. SSH into servers to check logs, or run commands during tests e.g adjust the server clock for timeout testing.
Use .testSSH()
or SSH.testSSH(context)
to begin SSH testing.
Run the accessibility scanner to test for WCAG violations.
Use .testPage().testAccessibility()
to run an accessibility scan.
Tests are written as fluent method chains:
Page Models are defined in simple .pagemodel files declaring page elements and reusable components. Syntax highlighers for the .pagemodel file format are included.
Java page model classes are generated from .pagemodel files automatically with a gradle plugin.