Bromium

Join the chat at https://gitter.im/hribol-bromium/Lobby Build Status Open Source Love Coverage Status

See it in action here

What is it

Bromium is a framework for running automated integration/end-to-end tests through the browser. It is especially effective for single page applications (SPA) and any front end that has a lot of dynamic stuff going on.

When should you use it

Simple example

TODO

Features

Example Bromium DSL app

This defines an action named Click on login button which translates to clicking the element with id login. If for example in another version we cannot locate the element by id, but by class, and leave the other actions unchanged, the configuration would look like this:

Example Bromium DSL inherit

Now if we execute a test with the step Click on login button, it would execute it correctly in any of the two versions. This makes your end-to-end tests version-independent.

What is the recommended test development process with Bromium

How is it different from

Bromium uses Selenium under the hood, but it adds more features and makes it faster to develop, because we assume that you are using Selenium for application testing. Selenium does not include any synchronization logic, which makes tests flaky unless you implement wait-for logic to cater for timing differences

Bromium uses actual interaction with the browser and records every HTTP request as well as action timestamps (perceived speed), making it possible to measure more complicated scenarios that the ones possible with JMeter. JMeter is better for example for performance testing of REST APIs, while Bromium is more suitable for integration tests and UI performance tests.

Selenium IDE records test cases on an HTML level, not on your application level. If I click on an element, it would record for example that the third div was clicked. Bromium would record that as an action in your application in the way you defined it, for example Click the third row, which would give you an executable test immediately after recording.

Planned

Contributing

How does it work?

It works by putting a proxy between the browser and your server and injecting javascript code to listen for events. When an event is detected, the javascript sends HTTP request to the proxy and the event in registered in the Java code. The whole test case is written to a JSON file. By a given configuration for your application and a given test case, you can replay your test using any browser.