Artillery test that signs any number of Ethereum transactions and sends them to one or multiple nodes.
- Create a .env file, you can use env_example as template
- In ethereumTestBasic.yml specify the node url in "url"
- Select the desired duration and arrival rate (e.g. 3 3 means 3 request each second for 3 seconds)
Execute:
npm install
npm install -g artillery
Execute:
artillery run <any ethereum test>.yml
To create a report:
artillery run --output report.json ethereumTestBasic.yml
artillery report --output report.html report.json
If you have installed artillery in local execute instead:
./node_modules/artillery/bin/artillery run ethereumTestBasic.yml
Before executing Smart Contract test do the steps 3 and 4 described in the "Smart Contracts" section
To change the Smart Contract to test with the "ethereumTestSmartContract.yml" do the following:
- Compile your Smart Contract using an external tool like "Remix"
- Paste in this project root folder the ABI and Bytecode following the format of "dummyABIandBytecode.js"
- Deploy the smart contract (you can use the tool "utils/contractDeployerUtility", just change the import to your ABI and Bytecode)
- Paste the contract address in the ".env" file
- In the file "signer.js" change the import to your ABI
- Execute the artillery test
To add nodes to the "ethereumTestMultipleNodes.yml" just copy the lines of any "post" and paste below. Then change the url.