Learn Rails Testing in a Month

Having a Hard Time Getting Comfortable
with Rails Testing?

When you’re getting started with testing it can be unclear what to test and how.

As you try to write tests, you may find yourself thinking thoughts like this:

  • “I don’t know what to write tests for”
  • “I know I should be testing, I just don’t know how to get started”
  • “It takes me forever to figure out how to write each test”
  • “I wish there was a simple, repeatable process I could use to write tests”
  • “No matter how much I read about testing, I just don’t get it”

If you don’t write tests then you’ll end up dealing with the consequences of not testing:

  • Fragile, buggy code
  • A game of “whack-a-mole” – fix a bug only to introduce a new one somewhere else
  • Nerve-wracking deployments followed by firefighting and maybe even rollbacks
  • A bunch of wasted time and frustration when you do try (and fail) to write tests
  • A feeling of being “behind” as a professional
  • Lost job opportunities when employers want to see testing skills that you don’t have

What would life be like if you had the testing skills you wanted?

In you were a competent Rails tester then:

  • You’d always know what to write tests for
  • You’d write tests for features just as easily as the feature itself
  • You’d know the exact formula to write a test for almost any feature
  • Your base level of understanding testing principles would help you more easily absorb the arcane teachings of testing books and articles

And instead of dealing with the painful consequences of not writing tests, you’d experience the positive results that testing brings:

  • Robust, thoroughly tested code
  • Any regressions are caught automatically by the test suite
  • Confident, uneventful deployments
  • Enhanced productivity and cleaner code
  • The ability to refactor freely and make your code even more maintainable and robust
  • A feeling of being a competent professional
  • Enhanced career opportunities

Introducing: Learn Rails Testing in a Month

Learn Rails Testing in a Month is a one-month online course that helps you get on the path to becoming a confident and competent Rails tester.

What exactly will I learn in this course?

Principles

  • How to decide what to write tests for
  • How to know exactly how to write a test when coding almost any feature
  • How to do TDD in Rails (and when not to)
  • What kind of tests to write (e.g. model tests, system tests), what kind of tests to ignore
  • When and how to use mocks and stubs
  • How much test coverage is enough

Tools

  • RSpec’s domain-specific language
  • Capybara for interacting with the browser
  • Factory Bot for setting up test data

What’s the format of the course? Is it just a bunch of videos?

In Learn Rails Testing in a Month you mainly learn two ways:

  • Live instruction by me, Jason, on a series of video calls
  • Homework that’s assigned between live sessions

During the 4-week course we’ll have a total of five live video calls: once at the beginning of each of the four weeks plus once at the end.

On our calls I’ll do a live demonstration where you and the other students will have an opportunity to not only see me work live but also stop me and ask questions at any time. At the end of the demonstration I’ll give a one-week homework assignment that relates to what I demonstrated.

In the periods between video calls you’ll have access to a Slack group where you can get help from me and from the other students.

Attendance will be limited to 15 students so I can give each student enough attention.

I have a full-time job. What kind of time commitment do I need to make for this course?

Our weekly video calls will be 60 to 90 minutes. Outside of that I’d recommend setting aside about 6 hours a week (roughly an hour a day) for homework.

The weekly calls will start at 9:30pm Eastern time (6:30pm Pacific time). My aim is to accommodate all time zones in the US.

What will I build during the course?

Throughout the course we’ll build a single Rails application called Mississippi.com, an online bookseller that competes with Amazon.

The features we’ll build (and write tests for!) will include:

  • CRUD actions for authors and books
  • Creating many-to-many relationships between authors and books
  • Creating orders, comprised of any number of line items, each having a book and a quantity

I’ll give you a Git repo to use as a starting point so you don’t have to waste time on “plumbing”. At the beginning of each week I’ll provide you with a fresh starting point so no one gets behind the rest of the class.

How do I know if Learn Rails Testing in a Month is for me?

Learn Rails Testing in a Month is for developers who are already pretty comfortable with Rails but lacking in testing experience.

If you sometimes struggle with things like knowing exactly what to write tests for, or if you’re often unsure how to approach testing the features you write, then this course is probably a good fit for you.

This course is not for highly experienced testers looking to sharpen their skills. It’s also not a fit for people who have never worked with Rails before.

Who is teaching this course?

I’m Jason Swett. I’ve been programming since around 1996 and doing Rails since 2011.

I never did any automated testing until I got started with Rails. It took me a couple years to get comfortable with testing but I think if I had had a course like this to help me I could have gotten there a lot faster. At this point I’ve been writing Rails tests for several years and I write tests for almost every feature I build.

I’m also the host of The Ruby Testing Podcast. I’ve worked as a corporate trainer, teaching programming in the United States, the Netherlands, Bulgaria and Nigeria.

What people are saying

“The best thing about Jason’s online workshop is he simulates exactly what’s it’s like to write tests in the real world for production software. His workshop was a great learning experience.”

Patsy Price, Sr. Software Developer, Santa Clara CA

“I didn’t have a ton of confidence in my RSpec or Capybara testing but after the workshop I definitely feel able to apply a methodology to my testing, particularly for front-end with Capybara.”

Eamonn Giblin, Jr. Software Engineer, Brooklyn NY

“The workshop was a great opportunity to get more practise writing tests on a real codebase and get clarification on some aspects of testing I had been unsure about. Since taking the workshop I definitely feel more confident with testing.”

Erica Porter, Rails Developer, London

Want to participate?

Registration is currently closed. If you’d like to join the next session of Learn Rails Testing in a Month, click the button below to get on the waitlist.

Get on the Waiting List