Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add notes about low-end hardware simulation

...

Double-click your script and you're good to go! (smile)

Tips for simulating low-end hardware (like on Jenkins test runs)

When tests seem to fail randomly in a non-reproducible manner on from Jenkins, it's sometimes related to slower hardware compared to local execution. To be more consistent and robust, it can be helpful to mimic such a low-end environment.

Use low screen resolution

Some failures (like hidden dialog commit buttons) only occur on screens with low resolution. With VirtualBox guest extensions properly installed, you should be able to simply resize the VM window and the guest's virtual screen should automatically adjust. As a reference for size, screenshots from failed Jenkins build may be used; or just roughly 1000 x 700 px.

Throttle your magnolia instance

Other test failures are caused by racing conditions only surfacing on slow systems, where certain elements take longer to load than usual. For Linux (now OS X too), there's a command line tool called cpulimit to set an upper CPU time percentage limit for certain processes.

  • On Ubuntu, install with sudo apt-get install cpulimit or simply click here (apt-url)
  • On OS X, clone it from GitHub and check the README for build instructions

Setting the limit to 5% for the process with id 1234 is done by

cpulimit -l 5 -i 1234