Giter Site home page Giter Site logo

flexbench's People

Contributors

ikyranas avatar iskitsas avatar kanha-13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flexbench's Issues

Basic requirements and UX for flexbench desktop app

1st time opening the app, the user should get a prompt to create a project, under which he will create his test scenarios

Multiple projects can be created, the user should select a project, find all scenarios, select a scenario to edit/run, or create a new scenario

Supported options for a scenario:

  • Set name of scenario
  • Total duration
  • Number of workers
  • Number of clients per worker
  • Number of total requests per client
  • Throttling per request in bps
  • Range of random or fixed delays between requests
  • Set list of requests to test
  • Run/Stop/Kill scenario
  • Save/Delete scenario

Test is not terminating for specific condition

Inside the runTest function when tried to terminate the test with condition, the stop() function is not terminating the test

To reproduce this issue below is the code for runTest()

      function runTest() {
          trafficSimulator.debugMode(true);
          trafficSimulator.testDuration(-1);//-1 for infinite run
          trafficSimulator.workers(4);
          trafficSimulator.clients(2)
          trafficSimulator.throttleRequests_bps(50000);//-1 for no throttling
          trafficSimulator.randomDelayBetweenRequests('0.5-1.1');
          trafficSimulator.setFunc('request', requestFunc);
      
          trafficSimulator.start();
      
          trafficSimulator.events.on('end', function (stats) {
              //This function will run on exit/stop, when worker has received a message to offload his stats to his master
              //Get from stats object all exposed metrics
              console.log('Traffic Simulator Results');
              console.log('-------------------------');
      
              var cArr = Object.keys(stats.counters);
      
              for (var i = 0; i < cArr.length; i++) {
                  var key = cArr[i];
                  console.log('counter %s: %s ', key, stats.counters[key]);
              }
              console.log("Exiting..");
              process.exit();
          })
      
      
      
          //stop test after specific period or condition\
          setInterval(() => {
              if (range_start_from > total_content_length) {
                  trafficSimulator.stop();
              }
          }, 1100);
      }

Prepare major release 1.0.0

To do:
[ ] Finalize issue #50
[ ] Prepare documentation and release notes
[ ] Set final version to 1.0.0
[ ] Publish basic lib to npm

Not able to POST a request

When using this package for post request it blocks the req.write() method which is used to write anything in the request body
Because of req.end() in line 422 of lib/main.js

To reproduce this bug replace the requestFunc with below code

 var requestFunc = function () {
//GENERATE REQUEST FUNCTION
const fileData = fs.readFileSync(__dirname + "/" + 'simple-request.js')

var headers = {
    'Content-Type': 'application/json'
};
var options = {};
options['host'] = 'www.example.com';
options['port'] = '80';
options['path'] = '/';
options['method'] = 'POST';
if (headers) {
    options['headers'] = headers;
}
//you can use the provided request function from HTS, in order 'catch'/count all response codes in a stats object
var req = trafficSimulator.request(options, function (response) {
    console.log("Response: %s", response.statusCode);
    response.setEncoding('utf8');
    response.on('data', function (chunk) {
        console.log(chunk.length)
    });
});

req.write(JSON.stringify(fileData));
req.on('error', function (err) {
    console.log('error:' + err.message);
});

}

Anonymization in/out

Anonymize IN:

  • Integrate a ML feature to anonymize input data provided during a flexbench test

Anonymize OUT:

  • For any response received from the server we target with a flexbench test, anonymize critical data (eg. names, emails, tax numbers, bank accounts, mobile numbers, phone numbers, addresses, cities, countries).

We could support 2 modes:

  • AUTO: let the application decide what to anonymize
  • MANUAL: user provides a list of rules, when matched, only then to anonymize

The anonymization feature can also be integrated in OpenAPI module (#72)

If needed we will split the work in smaller issues, keeping a reference (in comments) with this issue as a parent. For any split issue do not forget to add the labels:

  • gsoc24
  • improve-getting-started-guide

Aesthetic and UI/UX enhancements

Improvements for the desktop-app using react and the electron framework.

Identify glitches and other issues related with UI or UX. Propose any changes that will make the app better, simpler and more intuitive for using it in making stress or load tests.

If needed we will split the work in smaller issues, keeping a reference (in comments) with this issue as a parent. For any split issue do not forget to add the labels:

  • gsoc24
  • improve-getting-started-guide

Parallel processing not supported

Running two or more instances parallelly is not supported

To reproduce this issue:

Run simple-request.js parallelly using two different terminals.

No request sent

When the number of clients is 1 and the number of workers is greater than or equal to 3, no request is sent to the requested server

To reproduce the bug:

  • set number of workers = 3
  • set number of clients = 1

UI Inconsistent Fix: The animation bar in the simulation connection appears too short

  • Title:
    UI Inconsistent Fix: The animation bar in the simulation connection appears too short

  • Description:
    HTTPS Simulation connection animation bar looks slightly short, This issue affects the user experience by making the UI look inconsistent and unfinished.

  • Steps to reproduce the bug:

       npm run dev
    
       Open the simulation connection interface.
    
       create project and run 
    
       Observe the connection bar between the monitor and server icons.
    
  • Expected behavior: The connection bar should be long enough to properly connect the monitor and server icons without appearing awkward or incomplete. but the actual behavior is the connection bar is too short, making the UI look odd and visually unbalanced.

  • image

image
  • Suggested Fix
    Adjust the length of the connection bar so that it properly connects the monitor and server icons, creating a more balanced and visually appealing UI.
  • Environment:
    OS: MacOS
    branch: develop
    Versions: node-v16.17.0; npm-8.15.0;Docker version 20.10.18, build b40c2f6

RUN npm install failed

image OS: MacOS branch: develop Versions: node-v16.17.0; npm-8.15.0;Docker version 20.10.18, build b40c2f6

The issue caused might be missing essential environment packages required for building
I will find out the package missing and add to Dockerfile

Review latest develop for typos, fixes, improvements, regressions

The basic node js lib has been enhanced and additionally a desktop and server app have been implemented.

Before making the first major release we need to validate that the latest develop is in good shape, no regressions have been introduced, and the new apps are working as expected.

Under this issue we will address:

  • typos
  • better documentation
  • regressions
  • fixes
  • improvements
  • testing

Main Process Bug: Fix the run error when running http simulation project

  • Title:
    Flexbench Desktop-app main process error reported when run project simulation
  • Description:
    Error "A JavaScript error occurred in the main process" with Uncaught Exception: Error: Cannot find module 'agentkeepalive'
  • Console log:
    Uncaught (in promise) Error: Error invoking remote method 'runRequest': reply was never sent
  • Steps to reproduce the bug:
  1.  Clone develop branch from flexbench repo
    
  2.  Change directory to server-app
    
  3.  fellow README file and run npm install; 
    
  4.  npm run dev
    
  5.  create project and run 
    
  • Expected behavior: desktop-app should be running successfully after project created with simple scenarios, expecting feedback in Result container

  • image
  • Environment:
    OS: MacOS
    branch: develop
    Versions: node-v16.17.0; npm-8.15.0;Docker version 20.10.18, build b40c2f6

Doubts regarding the goals for this project

I gone through the idealist page and have certain doubts regarding the GSOC goals for this project:

  • Its mentions to make this a standalone desktop app , but in the second point its mentioned to make this a web server exposing REST APIs these two things I didn't understand clearly
  • I didn't understand the OpenIDC thing and Implement a DSL language to describe scenarios that can be executed by flexbench
  • Integrate Nginx proxy
  • Implement a DSL language to describe scenarios that can be executed by flexbench (eg. store a scenario under a .flxb file )
  • Implement an editor for .flxb files with syntax highlighting support

Please guide me through this so that I can start with the draft proposal

OpenAPI support

Implement a new module which will read OpenAPI (Swagger) documents and will create test scenarios for flexbench.

This module can be built in 2 phases:

  1. Read the OpenAPI document, and with the help of ML and nodejs generate a bash script with curl commands that make sense and with input data for curl commands that look like they have been provided by a Software QA Engineer to test (eg. if testing a submission of a registration form, provide data that look real, and exercise happy and sad flows)
  2. Read the OpenAPI document, and with the help of ML create ready to use .flex scenarios, to be consumed by our server and desktop app

Successfully implementing phase 1, means we can offer the module as a standalone script through npm for general usage, no depending on a flexbench app

If needed we will split the work in smaller issues, keeping a reference (in comments) with this issue as a parent. For any split issue do not forget to add the labels:

  • gsoc24
  • improve-getting-started-guide

body data missing in post request

The body data is missing in the POST request or any request that contains body

To reproduce this try to add body in the POST , DELETE, PUT, PATCH request

Https calls are not supported

Currently, the tool supports only http calls, even if the port is changed to 443. The config erroneously gives the user the impression that https urls could be used, but the core library does not support that, and it will fail.

Possible workaround:

When 443 port is used, the main lib should use the "https" module instead of "http".

Improve getting started guide (flexivian.github.io/flexbench) - general improvements

Review all the pages and make sure the provided info there:

  • is clear
  • the scripts and examples are working
  • is easy for a new joiner to follow

Fix typos

Focus on restructuring the pages to help someone understand the build process for all the 3 apps:

  • nodejs script
  • desktop-app
  • server-app

Provide clear example of usage for all the 3 apps

Provide a GSoC > 2024 page to keep a track of work during the 2024 Google Summer of Code (do not delete the previous page for GSoC2024)

If needed we will split the work in smaller issues, keeping a reference (in comments) with this issue as a parent. For any split issue do not forget to add the labels:

  • gsoc24
  • improve-getting-started-guide

Make sure documentation is up to date

Try to build and run the 3 different deliverables of flexbench: desktop, cli and server (all from "develop" branch)
Make sure the documentation is up to date and ready to use.
Please file bugs when you find something that's not working as expected.

Flexbench not working with node version 16 and above

When trying the basic example from README, with node 16 or 17, you will get this error:

giannis@Gianniss-MacBook-Pro testflexbench % node test.js  
Response: 200
1256
/Users/giannis/gitRepos/testflexbench/node_modules/keep-alive-agent/index.js:26
	var name = host + ':' + port;
	                ^

TypeError: Cannot convert object to primitive value
    at buildNameKey (/Users/giannis/gitRepos/testflexbench/node_modules/keep-alive-agent/index.js:26:18)
    at KeepAliveAgent.freeHandler (/Users/giannis/gitRepos/testflexbench/node_modules/keep-alive-agent/index.js:35:13)
    at KeepAliveAgent.emit (node:events:526:28)
    at Socket.onFree (node:_http_agent:376:11)
    at Socket.emit (node:events:526:28)
    at emitFreeNT (node:_http_client:713:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Compile Error Bug: Flexbench Server App can not build by npm run dev due to missing dependency

  • Title: Flexbench Server App can not be built by npm run dev due to missing dependency
  • Description:
  • Steps to reproduce the bug:
  1.  Clone develop branch from flexbench repo
    
  2.  Change directory to server-app
    
  3.  fellow README file and run npm install; create .env file and modify it; run npm run dev
    
  4.  Errors would be generating in console
    
  • Expected behavior:
  • server-side application expected to be install and run smoothly and successfully at first time complete and run
image
  • Environment:
    OS: MacOS
    branch: develop
    Versions: node-v16.17.0; npm-8.15.0;Docker version 20.10.18, build b40c2f6

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.