# Load Testing Script
After listening to the overview of Load Test Generator based on Locust, I think this is what we need for the load testing scenario we outlined in the Code With Us. As noted below, this a combination of generic features, some of which are for test management purposes only (e.g., request an invitation from a service by sending an HTTPS request), and others are "typical" Aries Agent controller "business logic" processing.
## Basic Script
This is the script that we would like to see for our specific use case. The script has a number of general features (listed after) and those general features are assembled into the specific use case. The overall script could be altered for other use cases.
* Start load agent by connecting to mediator
* Request invitation from Issuer via HTTPS
* Process invitation in Agent to contact Issuer
* Auto-respond to Issuer
* Accept connection
* Receive Offer/Request/Receive Credential
* Loop:
* Loop (1-10 times)
* Wait 10-60 seconds
* Request invitation from Verifier via HTTPS
* Process invitation in Agent for presentation/send presentation
* End Loop
* Wait 10-60 seconds
* Request revocation from Issuer
* Receive revocation notification from Issuer, delete revoked credential from wallet
* Receive Offer/Request/Receive Credential
* End Loop
* End Loop
Note: We plan to soon use "Action Menu" after a revocation notification, so eventually we would want functionality to do that.
## General Functions
1. On startup, based on a configuration, connect to a mediator via its public DID.
1. If not configured, skip the mediator.
1. Request an out of band invitation via a configured HTTPS address.
1. Send request, receive the invitation in the response.
1. Automate the processing of a credential offer/request/issue.
1. Process an invitation that is a connection request.
1. Retain the connection ID such that it can be used later in the script (not used above).
1. Request a revocation via a configured HTTPS address.
1. Implement random delays of N-M seconds.
1. No idea what best practices in load testing -- good to get guidance on this. Do we try for "realistic" delays or do things as fast as we can, with as few load agents as possible.