Capybara cucumber how it works

I use capybara and cucumber in my rails3 application. Everything works perfectly. However, I do not understand how the tests work.

Let's say that I have a standard test for cucumber. I do not use @selenium etc. This is a simple vanilla test. Now when i run

bundle exec cucumber

Does the rails server work on the port? If so, what is the port number? Also in the vanilla case, capybara uses a test stand. However, rack verification is not responsible for starting the server. So I was all confused how it all works. What role does the cucumber play. What rack test works and what does capybara do.

If you have links to articles, please share with me. I really want to know how everything works together.

+5
source share
1 answer

So far I do not know the deepest details about how this works. But I am doing enough to give you some perspective.

Cucumbers is a platform for testing the acceptance use of rubies; it allows you to write acceptance in plain English. Now, on the whole, he sits on top of Webrat or Capybara, which provide him with his true strength, that is, Simulated Browser or Automated Browser.

Capybara or Webrat make it easy to run acceptance testing. Capybara makes it easy to use a variety of drivers for acceptance testing. Drivers i.e. Selenium, speed or stance. In the case of vanilla, the test stand is used to simulate browser testing.

Rack-Test , , .. capybara. , , (, -), . Capybara .. , ( ), .

Cucumber , / .. , .. .

+5

All Articles