Skip to content

mvysny/testbench-simplest-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TestBench 5 Simplest Demo Possible

This is a simplest demo possible of running automated UI tests in a Vaadin 8 project using TestBench 5. No browser is required: the internal JavaFX browser built-in in Java 8 is used.

Please read http://mavi.logdown.com/posts/1414026-using-javafx-embedded-browser-for-testbench for more information.

Note: Vaadin 14 version of this project can be found at https://github.com/mvysny/testbench-simplest-demo-14

How to run it

Just run

mvn clean verify

An invisible JavaFX Browser will launch. To have a proof that the test actually ran, just see target/screenshot.png.

UI integration tests with Vaadin TestBench

Tests are run using Maven Failsafe plugin. Execute mvn verify. Verify phase will run multiple goals e.g. starting Jetty in a port defined in profile's config.properties file.

Failsafe's default test inclusion patterns are used.

  • "**/IT*.java" - includes all of its subdirectories and all Java filenames that start with "IT".
  • "**/*IT.java" - includes all of its subdirectories and all Java filenames that end with "IT".
  • "**/*ITCase.java" - includes all of its subdirectories and all Java filenames that end with "ITCase".

Unit tests

For unit tests the Maven Surefire plugin is used. Surefire's default test inclusion patterns are used.

  • "**/Test*.java" - includes all of its subdirectories and all Java filenames that start with "Test".
  • "**/*Test.java" - includes all of its subdirectories and all Java filenames that end with "Test".
  • "**/*TestCase.java" - includes all of its subdirectories and all Java filenames that end with "TestCase".

About

Simplest possible demo of TestBench 5 for Vaadin 8

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%