Giter VIP home page Giter VIP logo

wsload's Introduction

wsload

Load Testing Application for massive concurrent connections and complex scripted testcases v0.1.0

Install

To install the most recent realease, simply use npm

npm install wsload

and to run the Unit-Tests change to the install path of wsload and run

npm test

Depends on a local MongoDB-Installation and creates a database named 'wsload' where the results will be saved.

Usage

Create your testcases and set timeout values

var testcase1 = function add (input, cb, global) {
        var i = 1;
        var j = 2;
        var k = i+j;
        setTimeout(function(){
                cb(null, k); //set k as output value
        },1);
}
testcase1.timeout = 15; //set timeout to 15ms


var testcase2 = function subtract (input, cb, global) {
        var i = input;  //matches k from testcase1 (=3)
        var j = i-1;
        cb(null, j); //set k as output value
}
testcase2.timeout = 20; //set timeout to 20ms

Require wsload and instanciate a Testrunner

var wsload = new Wsload({logTarget:'db'});
wsload.on('finished', function (result) {
        console.log(result);
});
wsload.on('timeout', function (suitenumber, testcasesnumber) {
        console.log('Timeout occured in Suite ' + suitenumber + ' Case ' + testcasenumber);
});
/*
* Run a Testsuite with the name 'myFirstWsloadSuite' 3 times in parallel 
*/
wsload.runSuite('myFirstWsloadSuite',3,[testcase1,testcase2],null,300,null);

Feel free to use wsload and report any bugs on the Issues Page

Licence

(MIT LICENCE)

Copyright (c) 2012 Christian Vogt mail

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

wsload's People

Contributors

chris-- avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

wsload's Issues

Absolute start/stop date for every testcase

Every testcase should have a reference to the start time to be able to know which tests ran in parallel afterwards. This is especially useful for timeout cases where one wants to know what caused the timeout.

Numbering of Testsuites when using more cores

The Testsuite numbering is currently starting with 0 on each core. It needs to be calculated in each worker. This should help:

workerID: 0-numCPUs
workerCount: numCPUs

start# = (workerID * timesToRunSuite) / workerCount
stop# = ((workerID+1) * timesToRunSuite) / workerCount -1

Round start# and stop# to next int (down and up) to circumvent errors. Pass these to the suites from wsload.js.

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.