Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/algorand/graviton
🧑🔬 verify your TEAL program by experiment and observation
https://github.com/algorand/graviton
algorand avm blockchain pyteal pytest python smart-contracts tdd teal test-driven-development testing
Last synced: 8 days ago
JSON representation
🧑🔬 verify your TEAL program by experiment and observation
- Host: GitHub
- URL: https://github.com/algorand/graviton
- Owner: algorand
- License: mit
- Created: 2022-03-24T16:13:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T02:16:32.000Z (over 1 year ago)
- Last Synced: 2024-04-28T02:00:11.051Z (6 months ago)
- Topics: algorand, avm, blockchain, pyteal, pytest, python, smart-contracts, tdd, teal, test-driven-development, testing
- Language: Jupyter Notebook
- Homepage:
- Size: 202 KB
- Stars: 18
- Watchers: 6
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-algorand - graviton - Algorand's TEAL blackbox testing toolkit. (Development Tools / Other Development Tools)
- awesome-algorand - graviton - Algorand's TEAL blackbox testing toolkit. (Development Tools / Other Development Tools)
README
# About
Graviton is a software toolkit for blackbox testing of smart contracts written in TEAL.
## [Tutorial](./graviton/README.md)
## Local Installation
The following instructions assume that you have `make` available in your local environment. In Mac OS and Linux this is most likely already available and in Windows one way to install is with [chocolatey](https://chocolatey.org/) and the command `choco install make`.
To install all dependencies:
```sh
make pip-notebooks
```## Running Blackbox Integration Tests against a Sandbox
### Prereq - Install and Symbolically Link to the Sandbox
If you would like to use the [Makefile](./Makefile) without modification and with full functionality, you should create a symbolic link to [the algorand sandbox repo](https://github.com/algorand/sandbox) as described here. There are many ways to accomplish this. Assuming you have cloned ***the sandbox*** into the path `/path/to/algorand/sandbox/` and that you've `cd`'ed into the cloned `graviton` directory you should create a symbolic link as follows:
#### Linux / Mac OS
```sh
ln -s /path/to/algorand/sandbox/ sandbox
```#### Windows 10+
```sh
mklink sandbox \path\to\algorand\sandbox
```### Test the Sandbox
With your sandbox running to test that the sandbox is running properly, use the following:
```sh
make local-sandbox-test
```### Run the Integration Tests
```sh
make integration-test
```## Running and Testing Jupyter Notebooks
To run the notebook `notebooks/quadratic_factoring_game.ipynb` for example:
```sh
make local-notebook NOTEBOOK=notebooks/quadratic_factoring_game.ipynb
```To non-interactively run all the jupyter notebook tests:
```sh
make notebooks-test
```## Ensuring that all is Copacetic Before Pushing to Github
To test in your local environment that everything is looking good before pushing to Github, it is recommended that you run `make all-tests`
If you would like to simulate the github actions locally, you'll need to install [nektos act](https://github.com/nektos/act/wiki/Installation). On Mac OS with [Docker](https://docs.docker.com/desktop/mac/install/) previously installed you can use `brew install act`; on the other hand, on Linux and Windows follow the installation instructions in the nextos repo link above.
Once `act` is available you can simulate all the github actions integration tests with:
```sh
make local-gh-simulate
```