DEV Community

Discussion on: Need help in Integration testing ruby

Collapse
drews256 profile image
Andrew Stuntz

I have used Capybara alot and hesitate to recommend it. You're frontend runs and works with JS (probably) not Ruby. So acting like JS doesn't exist can lead to faulty integration testing, which is super frustrating.

Pros:
Fairly fast
Can use a multitude or browser drivers
Integrated in Rails

Cons:
JS sucks when using Ruby driven integration tests

I would recommend looking at Nightwatch.js if you're building a test suite from nothing.

Pros:
Fairly fast
Can use a multitude or browser drivers
JS integration rocks!

Cons:
Not integrated into Rails

I like to think of integration testing as acceptance tests or happy path testing. You don't want to test business logic with integration testing, you want to ensure that your UI responds in ways that you expect. Its a smoke test to ensure that your UI is responding appropriately.