Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

olympix-test-generator-1.2.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

olympix_test_generator-1.2.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for olympix-test-generator-1.2.1.tar.gz
Algorithm Hash digest
SHA256 1cd57b165b1dd3f2d053136e225ff46a2819386ddb62f1e9a7762991f4f0a75f
MD5 069627de5cf8bcd589943f360121d862
BLAKE2b-256 761ece54b54b5b458d707b3fb42d44558855510852ddc8b36160afd5b22f8846

See more details on using hashes here.

File details

Details for the file olympix_test_generator-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for olympix_test_generator-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3cabf4240c17446395fa14d76967442dc7a23862356e76eff8f15deaf544872
MD5 6e9f44e3a2c3f2ab5da66a9ea9337ce3
BLAKE2b-256 a3d1ffb318c5d0b7bd53c6a123400076cbec7fafb03b3ca94ce96cbe593d7654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page