Docs
Submit an issue
Smart Contracts
Smart Contracts
  • WELCOME
    • Smart Contracts
    • Installing Pop CLI
    • How to contribute
  • GUIDES
    • Get tokens on Pop (Testnet)
    • Set up your development environment
    • Create a new contract
    • Build your contract
    • Run your unit tests
    • Deploy your contract locally
      • Deploy locally on a Solochain
      • Deploy locally on Pop
    • Call your contract
    • Running E2E tests
    • Deploy on Pop
    • Securely Sign Transactions from CLI
    • Getting Started with ink! v6
  • TUTORIALS
    • Your first ink! smart contract
    • Mint a PSP22 token on Pop
  • POP CLI
    • welcome
    • install
    • new
    • build
    • call
    • up
    • test
    • clean
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. GUIDES

Running E2E tests

PreviousCall your contractNextDeploy on Pop

Last updated 1 month ago

Was this helpful?

⚠️ Note: This guide supports ink! v5 by default. For experimenting with ink! v6, please refer to our .

Make sure you are in your contract's directory:

cd flipper

If you look at the contract source, you will notice it has end-to-end tests at the end of the lib.rs file.

The ink! e2e tests are run against . Pop CLI will download the latest binary for your platform.

Run the e2e tests:

 pop test contract --e2e
┌   Pop CLI : Starting end-to-end tests
│
▲  ⚠️ The substrate-contracts-node binary is not found.
│  
◇  📦 Would you like to source it automatically now?
│  Yes 
│
◇  ✅ substrate-contracts-node successfully sourced. Cached at: /Users/bruno/Library/Caches/pop/substrate-contracts-node-v0.41.0
│
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.98s
     Running unittests lib.rs (target/debug/deps/my_contract-3c35b5992ffebf0d)

running 5 tests
test flipper::e2e_tests::e2e_test_deployed_contract ... ignored
test flipper::tests::it_works ... ok
test flipper::tests::default_works ... ok
   Compiling toml_datetime v0.6.5
   Compiling toml_edit v0.20.2
   ....
   Finished release [optimized] target(s) in 9.03s
   Running `target/ink/release/metadata-gen`
test flipper::e2e_tests::default_works ... ok
test flipper::e2e_tests::it_works ... ok

test result: ok. 4 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 47.56s

   Doc-tests flipper

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

└  End-to-end testing complete

Passed!

Further Reading Material

Technical Support

Create a question and tag it with ""

Share the StackExchange question in our

migration guide
substrate-contracts-node
release
https://use.ink/basics/contract-testing/end-to-end-e2e-testing
Polkadot Stack Exchange
pop
Pop Support Telegram channel