GithubHelp home page GithubHelp logo

webserver-tests's Introduction

Test Driven (web) Configuration

It's tedious and error prone to manually test the web server configuration (redirections, cache directives, SSL …) so I've tried to the usual "Test Driven" dance, in Ruby.

The tools in use :

To run the test suite :

  1. replace example.com with your domain in the test files (test/webserver/*_test.rb) and in test/support/webserver_helper.rb
  2. execute bundle exec rake test:webserver or bundle exec guard

You can set WEBSERVER_ENV to run the suite against a specific environment. I've been using production (default), staging or development, but you can change/add as many as you want.

FAQ

1. How is it "test driven"?

If you know in advance how you want your web app and web server to behave (regarding redirections, cache headers, cookies, SSL configuration …) you can prepare you test suite, let it fail and drive your configuration with them.

2. Why didn't you use X?

If you know a better tool or a better way to test those things, I'd be happy to improve.

webserver-tests's People

Contributors

jlecour avatar

Stargazers

JM Vallet avatar Jonathan Martin avatar

Watchers

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