e01.org

Capybara (software)

Capybara is a web-based test automation software that simulates scenarios for user stories and automates web application testing for behavior-driven software development. It is written in the Ruby programming language. Capybara can mimic actions of real users interacting with web-based applications. It can receive pages, parse the HTML and submit forms. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

Capybara is a web-based test automation software that simulates scenarios for user stories and automates web application testing for behavior-driven software development. It is written in the Ruby programming language. Capybara can mimic actions of real users interacting with web-based applications. It can receive pages, parse the HTML and submit forms. describe 'UserRegistration' do it 'allows a user to register' do visit new_user_registration_path fill_in 'First name', with: 'New' fill_in 'Last name', with: 'User' fill_in 'Email', with: 'newuser@example.com' fill_in 'Password', with: 'userpassword' fill_in 'Password Confirmation', with: 'userpassword' click_button 'Register' page.should have_content 'Welcome' end end An example of a Capybara feature used with Cucumber: When /^I want to add/ do fill_in 'a', with: 100 fill_in 'b', with: 100 click_button 'Add' end ===Capybara with RSpec=== Some minute integration is required in order to use Capybara with RSpec describe 'go to home page' do it 'opens the home page' do visit (get_homepage) expect(page).to have_content('Welcome') end end ==See also== Acceptance testing Acceptance test-driven development Behavior-driven development Test automation HtmlUnit List of web testing tools Regression testing Given-When-Then

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Capybara (software)". 1764708170. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1325395427

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·