appfolio / ae_page_objects

Page Objects for Capybara
MIT License
28 stars 9 forks source link

Simplify testing combinatorics #167

Closed dtognazzini closed 8 years ago

dtognazzini commented 8 years ago

The combinatorics involved with testing this gem are too complicated. These are the current dimensions of the build matrix: Ruby version, test suite (unit or integration), Rails version, Capybara version.

Some exclusions are in place so not every combination is being built. Still, there's way too much going on.

Take a look at a recent build before these changes: https://travis-ci.org/appfolio/ae_page_objects/builds/129808228

 Elapsed time 28 min 27 sec
 Total time 1 hr 47 min 27 sec

After these changes: https://travis-ci.org/appfolio/ae_page_objects/builds/129874954

 Elapsed time 12 min 37 sec
 Total time 29 min 39 sec

The changes in this PR result in the following:

Ruby versions

Only unit tests are run against various Ruby versions. We aim to only test against the oldest supported version (currently 1.9.3) and the most recent supported version (currently 2.2.5). We test against ruby-head but don't care about failures.

Capybara versions

Unit tests run against all supported versions of Capybara using the most recent Ruby version possible.

Integration tests also run against all supported versions of Capybara. These tests run using a Rails application, using the most recent version of Rails possible that supports the Ruby version that the version of Capybara under test supports. Today, all Capybara integration tests are run in the Rails 4.2 application using Ruby 2.2.5.

Rails integration tests

The ApplicationRouter is tested against various versions of Rails (currently 3.0 to 4.2). These tests use the most recent Ruby and Capybara versions possible for the version of Rails. These tests will move out of this gem when #83 is addressed.

Results

Unit tests run against every version of Capybara at most once and against both the minimum and maximum Ruby version at least once.

Integration tests run against every version of Rails at least once and every version of Capybara at least once.

ipmsteven commented 8 years ago

👍