Skip to content

Load Testing with Loadsy performance testing tool.

bradjohnson92008 edited this page Nov 30, 2021 · 6 revisions

To setup load testing on your local environment follow the instructions at https://loadsy.io/getting-started.

***Once you have completed the steps below be sure to add the following paths to your local System Variables ENV PATH entry.

 # C:\Program Files\nodejs\
 %AppData%\npm

Create a free account at https://loadsy.io - if you haven't already using your email address. You will be required to login in order to view the results...etc.

GETTING STARTED

Create your first test

Install Node.js - If it's already done skip to the next section.

The minimum supported Node.js version is v12.18.4.

Install the Loadsy cli Install the loadsy cli:

Copy $ npm i -g @loadsy/cli

Create your test Log in:

Copy $ loadsy login -e [email protected] -p

Create a loadTests folder to organize your loadsy projects. Feel free to name this folder however you want.

Copy $ mkdir loadTests

Copy $ cd loadTests

Create a new project. Typescript template is recommended (-t option), but not needed.

Copy $ loadsy create my-first-project --typescript

Copy $ cd my-first-project

Inside the scripts folder (if you used typescript template), there should be an example.ts file with a sample load test, modify the test to hit your endpoint or you can use https://www.loadsy.io/test as a dummy endpoint to test your script. The test should look like this:

Copy /* This is a typescript example for loadsy */ const result: ILoadsyResponse = loadsy.get('https://loadsy.io/test', { }, 'Example call to loadsy'); console.log(result.body);

export { }; Save the file if you haven't already, then upload your test:

Copy $ loadsy upload

And now run your test:

Copy $ loadsy run example.js

By default it will run with 10 threads for 30 seconds. You will be able to see live results in your terminal.

After the test is completed, go to the dashboard, select your project and your load test. And voila, you can see all the detailed analysis results of the test you just ran.

Clone this wiki locally