Fast, Sexy, and Svelte: Our Kind of Rails Testing
Location: Portland Ballroom 252 Audience level: Intermediate
Testing is an essential practice to delivering working software. We distinguish tests as unit, functional, or acceptance.
Unit tests are fine-grained, focused, and provide fast feedback. UnitRecord seamlessly disconnects ActiveRecord from the database to achieve this precision for models. Similarly, UnitController isolates Rails controllers from view rendering.
Functional tests are more collaborate and course-grained. They need data, and the Model Factory pattern removes any brittle dependency on fixtures. As test suites grow, we need to ensure they do not become slow and cumbersome to run. DeepTest provides modest parallelization so we can run our functional tests as often as our unit tests.
Testing through a browser is our only guarantee to ensure that our application actually meets acceptance criteria. Automating this process typically results in a fragile test suite that is slow, depends on a lot of data setup, and is hard to maintain. Selenium Grid, in conjunction with Model Factory and HPricot, significantly improves the design and maintainability of acceptance tests.
From unit to acceptance, this session covers the spectrum to teach effective testing of Rails applications.
People planning to attend this session also want to see:
Braintree Payment Solutions
Dan Manges is a passionate programmer who currently focuses on Ruby and Rails development. He enjoys giving back to the community by working on open source projects. After successfully bringing Rails into the enterprise at JPMorgan Chase, he is now a developer with ThoughtWorks.
Zak Tamsen is a senior software developer for ThoughtWorks Inc. He has over a decade of professional experience as a computer scientist. He has been building large enterprise Rails applications for the last two years. Zak enjoys having confidence in his work and has successfully convinced others to implement his ideas for testing applications more effectively, including DeepTest and Selenium Grid.