2
6 Comments

What's the hardest part of testing Rails apps?

When you are building your Rails apps what part of testing gets you hung up the most?

Feature tests? Unit tests? Getting CI working? JavaScript tests?

I'd love to hear where you struggle and help out if possible!

I've been doing Rails for ~7 years and testing for almost a decade.

  1. 1

    Not getting any customers looking at the value prop early enough because of spending too much time testing.

  2. 1

    End to end test are now feasible thank to cypress (and the excellent gem cypress-rails). I think the most difficult part is to know what to test, and how.

    1. 1

      I keep seeing this pop up - how does it compare to something like Capybara? What's the benefit over something tried and true?

      1. 1

        I tried Capybara and completely abandoned it. Capybara works pretty well for pages without JS, which means testing more HTML than functionalities. Capybara+Js is a nightmare to configure, both locally and on CI. Plus configuration could lead to brittle test. Cypress is a lot more robust, extremely easy to debug, agnostic to any JS fw used (or not).

    1. 1

      Ugh, amen! Have framework(s) are you using?

      I've had luck with headless Chrome, Capybara, and a gem that automatically keeps my binaries up to date. There's also some webmock configuration needed.

Trending on Indie Hackers
After 10M+ Views, 13k+ Upvotes: The Reddit Strategy That Worked for Me! 42 comments Getting first 908 Paid Signups by Spending $353 ONLY. 24 comments I talked to 8 SaaS founders, these are the most common SaaS tools they use 20 comments What are your cold outreach conversion rates? Top 3 Metrics And Benchmarks To Track 19 comments Hero Section Copywriting Framework that Converts 3x 12 comments Join our AI video tool demo, get a cool video back! 12 comments