Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Test spec with Cucumber #39

Open
aakoshh opened this issue Jan 20, 2023 · 0 comments
Open

Test spec with Cucumber #39

aakoshh opened this issue Jan 20, 2023 · 0 comments
Labels

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Jan 20, 2023

We could compile IPC test scenarios in Gherkin syntax (that is, plain english) and run it with Cucumber, as I demoed in filecoin-project/ref-fvm#1507

This would allow us to capture what should happen independent from specification documents and Go/Rust tests. Since we want to implement IPC with different tech stack (e.g. Eudico and Fendermint), it could be the basis of a test suite that all implementations should be able to pass. The developer just has to implement the "matchers".

We can use it to describe scenarios such as:

When account 1 in subnet 1 sends 10 tokens to account 2 in subnet 2
And the checkpoint from subnet 1 is processed
Then account 2 in subnet 2 has 10 tokens

When account 1 in rootnet withdraws their delegation from validator 1 in subnet 1
Then subnet 1 goes under the minimum collateral threshold in rootnet
And subnet 1 is suspended in rootnet

See:

@adlrocha adlrocha added the next label Jan 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants