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

Add quickcheck support #1648

Closed
wants to merge 6 commits into from
Closed

Add quickcheck support #1648

wants to merge 6 commits into from

Conversation

SkymanOne
Copy link
Contributor

@SkymanOne SkymanOne commented Feb 10, 2023

closes #1647

Notes

  • Added #[ink_e2e::test(quickcheck = true)] arg
  • Developer needs to do add additional argument to a function so quickcheck can pump input through. See example for demo.
  • The quickcheck featured test takes way longer to run (~80s for a single test). Not sure whether it can be optimised, probable need to add notice for devs.
  • The tests sometimes fail because of some logger error:
thread 'quickcheck_tests::e2e_tests::default_works' panicked at 'env_logger::init should not be called after logger initialized: SetLoggerError(())', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/env_logger-0.10.0/src/lib.rs:1154:16
  • I tried to use #[quickcheck] but it sits in separate crate quickcheck_macros and depends on quickcheck crate which sits behind dev_dependencies. I did not manage to re-export the attribute macro because it would complain about missing quickcheck dependency. If someone can explain to me how I can re-export quickcheck_macros, it is trivial to change back to attribute macro.

IMHO, quicktest would work better with regular #[ink::test] unit tests.

@HCastano HCastano changed the title [WIP] Add quickcheck support Add quickcheck support Feb 23, 2023
@SkymanOne
Copy link
Contributor Author

SkymanOne commented Jun 8, 2023

Closing PR as it's outdated and requires a rework.

@SkymanOne SkymanOne closed this Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to use quickcheck with E2E testing
1 participant