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
Then I validate the status of the last transaction is "expectedStatus"
Switch wallet address
When I set the active test wallet address to the address "walletAddress"
When I set the active test wallet address to the index {index}
When I fetch the wallet address at 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:
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:
When I set the active test wallet address to the address "0x1234567890abcdef1234567890abcdef12345678"
🚀 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:
Given I set the active test wallet address to the index 1
🚀 When I fetch the wallet address at index {index}
Purpose To fetch the wallet address from the provided index without setting it as the active wallet.
Required Values:
index
: The index of the wallet address in the test client list.
Example
When I fetch the wallet address at index 2
💡 Tip
Wanna learn how to write test using these step definitions? Visit How To Write Test page.