Coder Social home page Coder Social logo

cucumber-integration-testing's Introduction

Integration Testing your HTTP API with Cucumber

Build Status

This repository is an example application for demonstrating Cucumber testing of an HTTP API. The tag "application-to-test" shows the application with no tests at all, and all commits after this tag show adding Cucumber tests to the system.

Application

The application in question has the following endpoints:

  • Getting an Insecure resource - GET /api/insecure
  • Getting a Secure resource, which needs an access token to retrieve - GET /api/secure
  • Getting an Access Token by authenticating - GET /api/auth
  • Getting a List of resources - GET /api/list
  • Modifying a resource - POST /api/insecure
  • Resetting the system to a known state - POST /api/reset

Structure

The application itself lives in src/server. This can be run manually by executing node src/server/index.js.

The tests all live in src/acceptance. These can be executed by running grunt acceptance, which will:

  • Start the server
  • Run the tests against the server
  • Shut everything down

cucumber-integration-testing's People

Contributors

sazzer 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.