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

Blackbox/Whitebox tests docs missing #795

Open
juliancwirko opened this issue Jan 9, 2024 · 1 comment
Open

Blackbox/Whitebox tests docs missing #795

juliancwirko opened this issue Jan 9, 2024 · 1 comment

Comments

@juliancwirko
Copy link
Contributor

Do we have any ETA for docs on the new testing approach? 👇

There are two flavors of integration tests:

Black-box tests: execution imitates the blockchain, no access to private contract functions;
White-box tests: the test has access to the inner workings of the contract.

It isn't easy to learn the topic.
At least from the Testing overview section.
And I believe the Rust Testing Framework (in a different section) is outdated.

Topics to add:

  • What I can and can't test with whitebox/blackbox, very simple examples,
  • Which SC methods exactly can I access in both cases, and which not? For example, how to test the self.send().esdt_local_burn() triggered through the endpoint. What initial setup is required, what roles, how to set them, etc?
  • Simple initialization for both (whitebox/blackbox) - file structure, best practices, examples

The docs could be added systematically, not necessarily all at once, to split the work and gather feedback.

@andrei-marinica
Copy link
Contributor

Hi!
I'm terribly sorry for the inconvenience.
The trouble is, we are in a process of redesigning a lot of the testing framework, syntax-wise. Some of the documentation we might write today would become obsolete in about a month or so.
I will try though to get some of my colleagues to write on the subjects that are not subject to change in the near future.

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

No branches or pull requests

2 participants