3

I have two applications, a Rails JSON API, and a Javascript client framework.

What is the best way to do integration tests ?

And another question, can this be done via Capybara ?

1

1 Answer 1

1

If you want a true integration test, you can use Capybara with a driver that executes javascript, like Poltergeist, or Capybara-Webkit. Alternatively, you could use Selenium, but that's not quite as slick as a headless test.

That said, you will probably have a lot more luck and more solid tests if you test your front end and back end separately with Rspec on the back and Jasmine/Qunit on the front. Integration tests with JS are often tricky.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.