TestSuite4 is a framework for simplify development and testing of TON Contracts
Project description
TestSuite4 0.1.2
TestSuite4 is a framework designed to simplify development and testing of TON Contracts. It contains lightweight blockchain emulator making it easy to develop contracts in a TDD-friendly style.
Features:
- Speed - perform dozens of tests in just seconds.
- Complex test scenarios - using Python as a scripting language allows you to create testing scenarios of varying complexity.
- Deep Integration - access all internal messages, measure gas and control time.
- Easy installation - use
pip install tonos-ts4
to install TestSuite4 to your local Windows, Linux or macOS. Also you can easiliy compile it from source if needed.
See tutorials
for self-documented examples of framework usage.
List of tutorials
- tutorial01_getters.py - Working with getters of various types.
- tutorial02_methods.py - Working with external methods.
- tutorial03_constructors.py - Working with constructors.
- tutorial04_messages.py - Dispatching messages between contracts and catching events.
- tutorial05_deploy.py - Deploying a contract from a contract and working with it through wrappers.
- tutorial06_signatures.py - Working with singed external calls and handling exceptions raised by a contract.
- tutorial07_time.py - Fast-forwarding time however you need to.
- tutorial08_balance.py - Fetching contract balance.
- tutorial09_send_money.py - Send money and watch it travel within the virtual blockchain.
- tutorial10_encode_payload.py - Encode the payload for use in the
transfer()
call.
Prerequesites
- Python 3.6-3.9
- Latest version of Rust
- Cargo tool
Build for Linux and macOS
cd linker_lib && cargo update && ./build_release.sh
Build for Windows
cd linker_lib && cargo update && build_release.sh
Installing package in development mode
python3 setup.py develop # Linux and macOS
python setup.py develop # Windows
Disable developer mode
python3 setup.py develop --uninstall # Linux and macOS
python setup.py develop --uninstall # Windows
Run tutorials
cd tutorials
python3 tutorial01_getters.py # Linux and macOS
python tutorial01_getters.py # Windows
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for tonos_ts4-0.1.2rc0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e57e3b1c7085a1e3407b5acc766a8db1f6bf8ed2b6c3b304fa3e0a8a4f3ce24a |
|
MD5 | 32395245096712d5350da91b0b5e7e7d |
|
BLAKE2b-256 | 81b0b68fb0e3219259a6e14092190a77cd95ba3dfbdf8be4b5b2f320185c497a |