What is OnchainTestKit?

@coinbase/onchaintestkit is a comprehensive, type-safe framework for end-to-end testing of blockchain applications. Built to complement OnchainKit, it provides seamless integration with Playwright for robust automation of browser-based wallet interactions, local blockchain node management, and common blockchain testing scenarios.
Important: To effectively use OnchainTestKit, we strongly recommend studying:
  1. The main repository - Explore the source code, understand the architecture, and see how components work together
  2. The example tests - Real-world examples showing wallet connections, transactions, token swaps, and more
These resources contain practical patterns and best practices that will accelerate your testing implementation. The examples demonstrate common scenarios you’ll encounter when testing blockchain applications.

Why OnchainTestKit?

Modern blockchain applications require rigorous testing of wallet interactions, transaction flows, and network behavior. Manual testing is error-prone and slow, especially when dealing with complex wallet UIs and multiple networks. OnchainTestKit automates these processes, ensuring:
  • Reliability: Consistent test execution across environments
  • Reproducibility: Deterministic test results
  • Scalability: Parallel test execution support
  • Type Safety: Full TypeScript support

Architecture

Key Features

Next Steps

1

Install OnchainTestKit

Follow our quickstart guide to set up your testing environment
2

Configure Your Wallets

Learn how to configure wallets for your test scenarios
3

Write Your First Test

Start writing tests with our comprehensive guide