Used to auto-generate unit tests for smart contracts using the Forge framework.
Project description
Olympix Test Generator
Olympix Test Generator is a Python-based utility tool to streamline the process of generating unit tests for Solidity smart contracts. These unit tests are tailored to be compatible with Foundry, a specialized tool for writing unit tests in Solidity.
Prerequisites
- Python 3.7 or later
- Solidity 0.8.0 or later
Installation
Install the Olympix Test Generator through pip:
pip install olympix-test-generator
Configuration
Prior to running the script, you'll need to set the OLYMPIX_API_KEY environment variable in your system.
For Unix or Linux:
export OLYMPIX_API_KEY=your-api-key
For Windows:
setx OLYMPIX_API_KEY "your-api-key"
Usage
Olympix Test Generator offers a command-line interface for creating tests.
Initiate the test generation process with:
olympix generate
Upon executing the command, the tool will guide you through the steps required to generate the test.
A test contract will be created either in the same directory as the chosen smart contract, or in an adjacent test folder, should one exist. Existing files will remain unaffected. The generated tests are also displayed on the console.
For optimal results, generate tests for one function at a time.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file olympix-test-generator-1.2.1.tar.gz.
File metadata
- Download URL: olympix-test-generator-1.2.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd57b165b1dd3f2d053136e225ff46a2819386ddb62f1e9a7762991f4f0a75f
|
|
| MD5 |
069627de5cf8bcd589943f360121d862
|
|
| BLAKE2b-256 |
761ece54b54b5b458d707b3fb42d44558855510852ddc8b36160afd5b22f8846
|
File details
Details for the file olympix_test_generator-1.2.1-py3-none-any.whl.
File metadata
- Download URL: olympix_test_generator-1.2.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3cabf4240c17446395fa14d76967442dc7a23862356e76eff8f15deaf544872
|
|
| MD5 |
6e9f44e3a2c3f2ab5da66a9ea9337ce3
|
|
| BLAKE2b-256 |
a3d1ffb318c5d0b7bd53c6a123400076cbec7fafb03b3ca94ce96cbe593d7654
|