Closed playerx closed 2 years ago
Btw, It's really cool that you use Deno for testing. Respect!
Hey @playerx, thank you for opening this issue. Could you unpack what you mean by:
As I can see now only pseudo integration tests are supported ?
Thank you!
In pseudo-integrations I mean that it's not a real simulation. To simulate real case scenario we need to start bitcoin node, Stacks node and build blocks after some period of time automatically and next run tests against this environment. You have clarinet integrate
to start both nodes but there is no way to run integration tests against that environment.
The way I see is like Truffle or Hardhat, to pass the url of real environment.
I think Stacks team means the same here (that only pseudo-integration tests are supported): https://github.com/hirosystems/clarinet#execute-a-test-suite
So my question is if you plan to support real integration tests, to have the ability to run against real environments? it can be main net or custom test net
Running integration tests in environments like Testnet or Mainnet would be pretty tedious, I personally don't think this is an approach we can / will support in Clarinet. Clarinet is focused on unit tests. If testing your contracts on Mainnet / Testnet is a methodology that you'd like to experiment, you could just create a node project, pull stacks.js or micro stacks, submit transactions and assert results. Just prepare yourself for a flaky test suite, you'll be constrained by bitcoin block time (10m average, but could be 1m or 45m), miner inclusion / exclusion and so on.
Do you plan to support integration tests in clarinet cli tool? My goal is to run tests against testnet or devnet (clarinet integrate). As I can see now only pseudo integration tests are supported. Just to have
--networkApi
parameter and to pass the url of the stacks node api. Please share your vision and plans about it. ✌🏻