I'm running ganache-cli which seems to have a block gas maximum of around 6.5 million. All the research I've done about this question seems to provide answers of the user themselves setting the user gas LIMIT (not what I want) or setting a gas amount for the contract creation only, also not what I want.
What I have is a smart contract that I want to run millions of automated unit tests over in a "for" loop on the Solidity side. The smart contract contains randomness so each time it loops through a different result is output. I need to ensure over millions of unit tests that all the random results reach their expected value.
The problem is that I can only do about 20 "loops" before the 6.5 million gas is reached. I've tried doing a for loop on the web3 javascript side with Metamask however the problem here is that Metamask will pop up asking me to confirm the transaction every single time I want to run these 20 "loops". So 100 unit tests would require me clicking 5 times. A million? An awful lot.
How would I go about doing this? I thought if there is a way to increase the block gas maximum I might be able to increase my loop size to at least 1000 or so.
Or if you're aware of an alternate solution how I could automate millions of unit tests that would be great.