Chukti is a tool for testing smart contracts using plain English sentences with Gherkin syntax. It offers human-readable tests, supports platforms like Hardhat, Truffle, and Foundry, and allows quick setup with automated commands.
Write tests in plain English with Gherkin syntax, making them accessible to all team members. It includes predefined steps for common operations.
Supports Hardhat, Viem, Forge, and Anvil setups with customizable step definitions to fit project needs.
Initialize new projects with a single command, streamlining workflow and saving setup time.
Allows you to initialize a smart contract testing project using Chukti. You can initialize by running commands either globally or locally using npm or yarn.
Provides options for project setup with either 'Hardhat + Viem' or 'Forge + Anvil'. Depending on your preference or use case, select the module that suits your development and testing needs.
Offers insights for those new to smart contract testing to help choose between Hardhat + Viem and Forge + Anvil based on ecosystem richness, performance, complexity, and community support.
Chukti supports Hardhat, Truffle, and Forge setups. You can initialize a new project with a single command, reducing the need for complex configurations.
Tests are written in plain English using Cucumber's Gherkin syntax, making them easy to understand for all team members.
Chukti offers a set of predefined steps for common operations like deploying contracts and reading or writing to contracts, speeding up the testing process.
Chukti allows you to add your own steps and hooks for specific project needs, offering a lot of customization.
Guides you through creating a simple Solidity contract named 'Counter.sol.' This contract handles basic operations like getting, setting, incrementing, and decrementing a number.
Instructs you to write a test file 'counter.feature' to test the 'Counter' contract. It includes deploying the contract and interacting with it.
Explains steps to run the feature test using commands to verify contract deployment and its functions, such as incrementing a number.
Breaks down how the feature test works, including steps like checking contract existence, deploying the contract, reading values, and validating outputs.
This directory contains your Solidity contracts. The 'Counter.sol' file is a sample contract to get you started, and you can add more contracts as needed.
This directory contains your Cucumber feature files. The 'Counter.feature' file defines test scenarios for the 'Counter' contract using Gherkin syntax. You can create additional feature files to test other contracts or scenarios.
The 'steps.ts' file maps the steps in the 'Counter.feature' file to the actual code that performs the actions. You can add more step definition files as needed.
This directory will contain the test reports generated after running your tests. The 'test-report.html' is an example of a test report that can be configured in your project settings.
This is the configuration file for Chukati, specifying the project type and other settings. Example: { "projectType": "hardhat-viem" }.
This is the configuration file for Hardhat, specifying the Solidity version and other settings for your Hardhat project.
This file specifies which files and directories should be ignored by Git, such as 'node_modules', 'artifacts', and 'coverage'.
This configures Cucumber for your project, specifying paths to your feature files and step definitions, as well as the format and location of the test reports.
This directory contains your Solidity contracts. The 'Counter.sol' file is a sample contract provided to get you started, and you can add more contracts as needed.
This directory contains your Cucumber feature files. The 'counter.feature' file defines test scenarios for the 'Counter' contract using Gherkin syntax, and you can create additional feature files.
The 'steps.ts' file maps the steps in the 'counter.feature' file to actual code that performs the actions. Additional step definition files can be added as needed.
Contains test reports generated after running your tests. The 'test-report.html' file is an example, and you can configure the format and location of the reports.
Specifies which files and directories should be ignored by Git, including 'node_modules', 'cache', and 'out' directories.
Configuration file for Chukti, specifying project type and settings, e.g., {"projectType": "forge-anvil"}.
Configures Cucumber for the project, specifying paths to feature files and step definitions, as well as the format and location of test reports.
This step allows you to load a smart contract from a specified file path. It uses the syntax: 'Given I have a smart contract located at "path/to/contract.sol"'. Required values include the file path to the smart contract relative to the project root.
This step lets you deploy a smart contract with specified constructor arguments and an amount of Ether. The syntax is: 'When I deploy the smart contract with constructor arguments "args" and send "amount" Ether'. You need to specify the arguments and the amount of Ether.
This step validates the deployment status of a smart contract. It uses the syntax: 'Then I validate the deployment status is "expectedStatus"'. The expected status can be either success or reverted.
This step allows you to call a read-only function on the contract with specified arguments. The format is: 'When I call the read function "functionName" from the contract with arguments "args"'. Required values are the function name and the arguments.
This step helps you call a state-changing function on the contract with specified arguments and Ether. The syntax is: 'When I call the write function "functionName" from the contract with arguments "args" and send "amount" Ether'. Required values include the function name, arguments, and the amount of Ether.
Validates the status of the last transaction against an expected status which can be 'success' or 'reverted'. Useful for confirming transaction outcomes in tests.
Multiple functions for managing wallet addresses including setting the active test wallet address to a specific wallet address or to a particular index from a list of wallet addresses.
Allows you to validate the value stored in a variable against an expected value using a specified comparison operator. It requires the variable name, comparison operator (like equal to, not equal to, greater than, less than), and expected value for comparison.
Enables storing the result of the last operation in a specified variable. You simply need to specify the variable name where the result will be stored.
ChukIt allows users to write smart contract tests using plain English sentences with Gherkin syntax. It supports both Hardhat + Vitest and Forge + Anvil setups.
Users can install ChukIt globally using npm with the command 'npm install -g chukit'.
Users can initialize a new ChukIt project by running the command 'npx chukit init'.
To run tests, users navigate to their project directory and execute 'npx chukit test'.
ChukIt provides predefined step definitions for common operations, and users can also write custom step definitions in their 'support' directory.
ChukIt supports TypeScript projects with either Hardhat + Vitest or Forge + Anvil setups.
ChukIt provides explanations and solutions for common errors such as 'Unsupported project type' and 'No ChukIt project found' errors.