[Technical Design][Draft]e2e Framework #141
manishbista28
started this conversation in
Ideas
Replies: 1 comment
-
Are we talking about cmd/e2etest? Will it possible to run e2e tests locally? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
The tests used by each chain specific bridge differ significantly even though the core tests should remain the same for the BTP protocol. This introduces discrepancies across branches that are hard to track. Therefore, there is a need for a unified testing framework, specifically an end-to-end testing framework with the core set of tests shared across each individual BTP integration.
Terminology
Considerations
Chain API
Interface
Test Runs
Design
This section is broken down into subsections, each focusing on a specific module that combines to form the overall system.
Chain API Subscription Client
Chain API RPC Client
RPC Client only serves to provide a set of helper functions that can be used to execute calls like querying for balance, sign and send transactions, call methods of a smart-contract, etc. The parameters necessary for the RPC call e.g. gas limit, gas price should be appropriately selected.
Chain Agnostic Interface
The interface provides a set of functions that are necessary for executing transactions on a chain. It should include functions for the following tasks:
Test Runner
The test runner executes scripts, each of which are written to test a specific case. Along with the chain interface, it also includes a set of helper scripts that eases writing the tests. A pseudocode of a script to do a transaction is as follows.
Beta Was this translation helpful? Give feedback.
All reactions