문제

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 ?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top