Blockchain Step Definitions
Chukti provides a set of step definitions that can be used to perform various blockchain-related operations and assertions in your tests. These steps help you to perform various tasks other than contract related blockchain operations. Each step definition is explained with its purpose, usage, required values, and examples.
List of Step Definitions
Transaction Status Validation
gherkin
Then I validate the status of the last transaction is "expectedStatus"
Switch wallet address
gherkin
When I set the active test wallet address to the address "walletAddress"
gherkin
When I set the active test wallet address to the index {index}
Detailed Step Definitions
🚀 Then I validate the status of the last transaction is "expectedStatus"
Purpose: To validate the status of the last transaction.
Required Values:
expectedStatus
: The expected status of the transaction. It can be eithersuccess
orreverted
.
Example:
gherkin
Then I validate the status of the last transaction is "success"
🚀 When I set the active test wallet address to the address "walletAddress"
Purpose: To set the active test wallet address to the specified wallet address.
Required Values:
walletAddress
: The wallet address to set as the active test wallet address.
Example:
gherkin
When I set the active test wallet address to the address "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
🚀 Given I set the active test wallet address to the index {index}
Purpose: To set the active test wallet address to the specified index in the test client list.
Required Values:
index
: The index of the wallet address in the test client list.
Example:
gherkin
Given I set the active test wallet address to the index 1
💡 Tip
Wanna learn how to write test using these step definitions? Visit How To Write Test page.