paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Consolidate tests and testing utilities #10591

Open sandreim opened 2 years ago

sandreim commented 2 years ago

Not all Substrate testing utilities are available to Polkadot/Cumulus which currently duplicate the initial Substrate implementation. For example the Substrate cli integration tests (https://github.com/paritytech/substrate/tree/master/bin/node/cli/tests) have been improved to use RPC APIs instead of sleeping to wait for block production, while Polkadot tests are lagging: https://github.com/paritytech/polkadot/tree/master/tests.

We need to take a pass on all of these tests and see if they can be reused or at least the testing utilities can be exported to minimize code duplication and future divergence in Polkadot/Cumulus.

bkchr commented 2 years ago

I think it should be possible the create some sort of crate that exposes a function that will then run all of the tests. This can then be put into a test into each repo.

ECJ222 commented 2 years ago

Hi @sandreim,

Please can you expatiate more on this issue?