Giter Club home page Giter Club logo

egi-website-tests's Introduction

EGI Website tests

Build Status Codacy Badge

These are behaviour-driven tests for the EGI website, using cucumber. The features directory contains user stories and features that the website should have. The features are written in the gherkin language, using plain human language. Tests are implemented in ruby, and found in the features/step_definitions/ directory.

How to use this repo

If you have a scenario or feature which should be present on the website, it should come here. You should be able to run the tests on your local setup in order to test your proposed feature, before opening a pull request and discussing it. This will require an installation of cucumber, and backing tools for browser automation.

Tools, Browsers and Drivers

We use Watir to implement the tests, which in turn requires a selenium driver for the browser you want to test with. Watir's documentation goes into detail about how to use it, but their guides are more readable when getting started:

For an example, see the before_install part of the Travis setup

Describe your feature

We refer to the Cucumber documentation for explaining how to do this. A good starting point is their BDD overview

Execute the tests

Running the tests is simple: just execute cucumber on the command line ๐ŸŽ‰ You should get a test summary:

egi-website-tests$ cucumber
@checkin @public @engagement
Feature: Does the EGI Website correctly describe the state of CheckIn?
  Everybody expects CheckIn to be in production, but it is only production for internal users.
  External users are able to enquire about it, even though it's marked as beta

  Scenario: CheckIn is in Beta for the world, but production internally # features/checkin_is_properly_described.feature:6
    Given I am on www.egi.eu                                            # features/step_definitions/stepdefs.rb:8
    When I go to Services                                               # features/step_definitions/stepdefs.rb:15
    Then I see a link to Internal Services                              # features/step_definitions/stepdefs.rb:19
    And I see a link to CheckIn                                         # features/step_definitions/stepdefs.rb:23
    And The page shows that CheckIn for external users is in Beta       # features/step_definitions/stepdefs.rb:30
    Given I am on the services page                                     # features/step_definitions/stepdefs.rb:38
    When I go to internal services                                      # features/step_definitions/stepdefs.rb:43
    Then it has a list of services                                      # features/step_definitions/stepdefs.rb:47
    And one of them is Security                                         # features/step_definitions/stepdefs.rb:54
    And The security item lists CheckIn                                 # features/step_definitions/stepdefs.rb:59
    But the service is not marked in Beta                               # features/step_definitions/stepdefs.rb:63

1 scenario (1 passed)
11 steps (11 passed)
0m13.735s

Tests that fail are then used to help the developers implement desired features on the service.

Send a pull request, discuss

Features and scenarios need to be agreed upon by several groups and roles. Although an individual can propose tests which can drive the development of a service, it is the diverse perspectives of various stakeholders which will decide what features and scenarios are valid and desirable.

The typical way to do this is the typical git-flow way:

  • clone the repository to your own account
  • work on a feature with some scenarios
  • open a pull request and ask for review from user representatives and product owners
  • get developer feedback

Requests for new features may also be made for features by opening issues, or linking to existing user stories elsewhere.

Cucumber Pro

โš ๏ธ Cucumber Pro is currently in closed Beta, this section could become irrelevant without notice

Cucumber Pro is a place where design, dev and ops can collaborate on the development of the product easily. Our project is at app.cucumber.pro/projects/public-website

egi-website-tests's People

Contributors

brucellino avatar codacy-badger avatar dependabot[bot] avatar enolfc avatar gwarf avatar

Watchers

 avatar  avatar  avatar

Forkers

gwarf

egi-website-tests's Issues

Documentation points to cover

A few small points are missing in the README:

  • Mozilla geckodriver is required and should be installed manually/externally
  • Usage instructions are missing (i.e. like running cucumber)

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.