Giter Club home page Giter Club logo

capybara101's Introduction

Testing With Capybara

Skill Level: Beginner
Time Limit: 30 minutes

The aim of this challenge is to introduce you to acceptance testing. Your job will be to create automated tests using Capybara & Cucumber that mimic a user logging into the site and navigating to a special page.

NOTE: To login, your username must be the same as your password.

Capybara helps us test web applications by simulating how a real user would interact with an app.

Instructions

  1. Clone the repo to your computer and bundle its gems
  2. Run the application bundle exec rackup -p 4567 then navigate to localhost:4567 in your browser and see what the app does
  3. Then run your cucumber tests cucumber features
  4. View the cucumber login.feature that's been created for you
  5. Fill out the login step_definitions so that they pass
  6. Then complete the logout.feature and its steps to test logging out a user
  7. Review the considerations below and refactor the features or step definitions as needed.

Considerations

  • What needs to be tested to ensure that the user authentication functionality of this app works correctly?
  • Besides the faulty password scheme, what's the other glaring authentication problem with this application?
  • Cucumber is not a big fan of duplicating step_definitions, do you think you might reuse some of the steps from login_steps for your new scenarios.

Resources

capybara101's People

Contributors

jaybobo avatar nickmccurdy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.