uptest-sc / uptest

"curl" for substrate runtime upgrade testing
7 stars 4 forks source link

Uptest

Substrate rUntime uPgrade TESTing library

Crates.io LibUptest Docs.rs Libuptest License: MIT

Funded by:
Polkadot Treasury

Documentation:

https://uptest-sc.github.io/
https://docs.rs/libuptest/0.1.2/libuptest/

Latest release:

0.1.2

Uptest

Uptest aims to be an easy stand alone library for testing runtime upgrades before they are deployed.
Use libuptest to execute extrensic test before and after the upgrade is pushed

substrate runtime UPgrade TESTing suit

With uptest you can:

See future usage_future.md for more details

Got a feature you want us to add on the roadmap?

Submit a github issue

To be avaliable with cargo in the near future:

https://crates.io/crates/uptest

Check out future planned features here:

https://github.com/users/uptest-sc/projects/1/views/1

Examples

Run examples:

$ sh run_example.sh

Get metadata version:

use libuptest::jsonrpseeclient::JsonrpseeClient;
use libuptest::ws_mod::get_metadata_version;

println!("Connecting to Edgeware");
let dial_edg: JsonrpseeClient = JsonrpseeClient::edgeware_default_url().unwrap();//.unwrap();//.unwrap();
let edg_version: u8 = get_metadata_version(dial_edg).await?;

println!("Connected to chain: {:?} and got metadata version: {:?}", "Edgeware", edg_version);

cargo run -p uptest-examples --example metadata_version

Get all pallet's storagevalues and storage maps:

cargo run -p uptest-examples --example get_pallet_storagemaps_storagevalues

Default connection endpoints:

The rpcclient comes with 5 different "default" chain endpoints:

Examples and Documentation:

https://uptest-sc.github.io/

Runtime Migrations links:

https://github.com/apopiak/substrate-migrations
https://substrate-developer-hub.github.io/docs/en/knowledgebase/runtime/upgrades
https://docs.substrate.io/reference/how-to-guides/parachains/runtime-upgrade/
https://github.com/paritytech/substrate/issues?q=label%3AE1-runtimemigration%20
https://wiki.polkadot.network/docs/learn-runtime-upgrades