Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For this we can use Selenium/Phantomjs's ability to take screenshots. Using screenshots of a rendered page we can load the screenshot, then use Selenium's knowledge of the position and size of a web page element to extract from the screenshot the actual rendering of the component as a bitmap. This bitmap can then be further analyzed.


Tests and the Travis-CI build

Failed test screenshots

The UI tests that run during the build will make screenshots for those tests that fail. These screenshots are stored inside the [module]/target/failsafe-reports directory as classname_testname.png, for instance:

Code Block
display ./to.etc.domui.demo/target/failsafe-reports/ITTestLookupInput_testInitialLayout.png

If the build fails all of the failsafe-reports directories are collected and tarred, and these are copied to the deployment server so that they can be obtained (they are copied to deployer@xxx/reports.tgz).

The version of phantomjs inside the build

Travis-CI has phantomjs default in its image, but that is an older version (2.0.0). To ensure that we have the same results locally and in the build the build script will download version 2.1.1 of phantomjs and cause it to be used by setting the PATH to it.