Git Product home page Git Product logo

web-server-testing's Introduction

Web Server Testing

This is a collection of static files you can use to test a web server. Be sure to change the permissions of the file test.txt so you get a 403 code when accessing it:

chmod ugo-r web/static/files/test.txt

Protocol Testing

In the test directory is a script to test how well your server conforms to the HTTP protocol:

python protocol.py [-s server] [-p port]

This will send various messages and check for the proper response.

Load Testing

You can load test a web server using

python stress-test.py [host]:[port][path] -t [threads] -d [duration]

For example:

python stress-test.py localhost:8000/static/files/largefile.txt -t 10 -d 10

This will create 10 threads each downloading the given file for 10 seconds.

Workload Testing

You can use a generated workload to test your web server using

python generator.py --server [host] --port [port] -l [load] -d [duration]

This will generate load on your server using an exponential distribution whose average is given by [load], for [duration] seconds.

For example,

python generator.py --port 8000 -l 10 -d 30

will generate 10 clients per second, for 30 seconds, accessing the web server on localhost at port 8000.

When the script runs, each session generates output with the format:

[sessionID] [URI] [status] [bytes] [seconds]

where:

[sessionID] is a unique identifier for the session
[URI] is the URI of the file downloaded
[status] is the status phrase returned by the server
[bytes] is the number of bytes downloaded
[seconds] is the time it took to download the URI, in seconds

web-server-testing's People

Contributors

mholt avatar zappala avatar

Watchers

 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.