Skip to content

Generation of Random Instruments for Testing

Taeshin Ushiroda edited this page May 11, 2025 · 4 revisions

Each of these classes generate the specified objects in place and send the objects directly to the TEUA Controller.

To run, in EnergyApplication.java, create a new instance of the needed random class as an argument of CommandLineRunner.

image

RandomCreateClientTender Class

Generates 50 random ClientCreateTenderPayload objects.

Options exist to specify number of tenders generated, a range of values for the tenders, and a range of quantities for the tenders.

RandomCreateClientStreamTender Class

Generates 50 random ClientCreateStreamTenderPayload objects with 6 stream intervals each.

Options exist to specify number of tenders and stream intervals generated, a range of values for the tenders, and a range of quantities for the tenders.

RandomCreateClientQuote Class

Generates 50 random ClientCreateQuotePayload objects.

Options exist to specify number of quote create requests, a range of values for the quote create requests, and a range of quantities for the quote create requests.

RandomCreateClientStreamQuote Class

Generates 50 random ClientCreateStreamQuotePayload objects with 6 stream intervals each.

Options exist to specify number of quote create requests and stream intervals generated, a range of values for the quote create requests, and a range of quantities for the quote create requests.

RandomAcceptClientQuote Class

Generates 50 random ClientAcceptQuotePayload objects.

Because the Quote IDs of quote accepts generated must match the Quote IDs of quote create requests, which are not known by this generator, this class is currently useless.

GeneratePostmanCollection

Run this java file directly. Generates a postman collection with 100 random tenders at path eml-cts/complete/src/main/resources/Generated_Postman_Collection.json. The segmentID is set to 2 by default, signifying that the tenders go to the auction market.

Clone this wiki locally