Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: using quickcheck for strong tests at the token channel code #37

Open
realcr opened this issue Mar 15, 2018 · 2 comments
Open

Idea: using quickcheck for strong tests at the token channel code #37

realcr opened this issue Mar 15, 2018 · 2 comments
Assignees
Labels

Comments

@realcr
Copy link
Member

realcr commented Mar 15, 2018

Quickcheck is a rust crate: https://github.com/BurntSushi/quickcheck
It allows to test various predicates by automatically generating input, possibly in a smart way.
I am not fully sure how it works internally, but it looks very promising.

We might be able to use quickcheck to test some critical parts like the token channel state machine for the Networker and the Funder. I have no idea if this will increase the amount of time the tests run, but we might be able to separate the quickcheck tests from the rest of the tests.

This is an idea for the future, I wanted to make sure that I don't forget.

@A4Vision
Copy link
Contributor

Thumbs up. I think that TokenChannelCredit (the wallet itself) will also benefit from it.
A note for the future: the predicates might be non-trivial, because the tester must issue correct hash values.

@realcr
Copy link
Member Author

realcr commented Mar 17, 2018

Oh the hashes! I hope we can find a workaround there (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants