DEV Community

Discussion on: A simple AI to simulate multiple methods call

Collapse
nicolalc profile image
Nicola Author

You're right, the idea is to trigger 'automatically' some methods.

In my case I have multiples server-side rest API methods to test, so I use this script to make multiple rest calls to my server without any manual rest call.

So I can check if there are some chaining or performance issues with a lot of consecutive or parallel rest api calls.

For example, I can create 1000 AI instances, and each instance will make a rest call to the server, so I can check if the server is working good and if the data generated is correct, also I can check if the server is working good with a lot of input requests.

Another useful use case is on websocket, if you want to test websocket interactions with broadcast/unicast messages without calling manually a server-side method you can use this script, take this example:

loom.com/share/8cffce9f751241f997b...

In this example I'm simulating a server-side methods (environment update / node insert, etc..) to test my websocket connections.