Giter VIP home page Giter VIP logo

uptest's Introduction

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:

  • Easily query changes mades to types, storagemaps etc..
  • Quickly get started with writing extrinsic tests with libuptest, let the library handle the execution logic before and after the runtime upgrade takes place
  • More lightweight standalone version, rust code is not reliant on the main substrate repo
  • Utilize a standalone rust library to build out your integration tests
  • Filter output based on pallet, to get a detailed change log
  • Schedule tests to execute before and/or after a runtime upgrade takes place, developers does not need to spend any extra time, tracking the state and execution flow of the runtime upgrade with polkadot.js typescript
  • no kitchensink-runtime needed

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:

  • with_default_url -> ws://127.0.0.1:9944
  • edgeware_default_url -> wss://edgeware.jelliedowl.net:443
  • polkadot_default_url -> wss://polkadot-rpc-tn.dwellir.com:443
  • kusama_default_url -> wss://kusama-rpc-tn.dwellir.com:443
  • sora_default_url -> wss://ws.mof.sora.org:443

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

uptest's People

Contributors

flipchan avatar uptest-sc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.