New Polygon PoS Testing Toolkit Makes Devnet Management Easier Than Ever

Polygon Labs
November 7, 2023
Developers
Image source: Dribbble

Polygon Labs has been hard at work on a new set of tools for managing devnets on the Polygon network. Introducing, new-and-improved Polygon PoS v1 Testing Toolkit!

This toolkit represents a significant leap forward in simplifying the deployment, monitoring, and testing of Polygon PoS devnets, reducing the development cycle for new releases and enhancing the overall development process. The Testing Toolkit is built on top of Express-CLI, an extension of Matic-CLI, and can be used to create devnets, test new features, and ensure that all end-to-end tests pass. It can also simplify the process of spinning up testnet and mainnet nodes.

The Polygon PoS v1 Testing Toolkit was built with three key objectives in mind:

  • Highly customizable deployment -- provide developers with a one-click deployment solution for Polygon PoS devnets, allowing for a highly customizable experience;
  • Efficient monitoring and testing -- offer efficient tools to simplify and automate deployment, monitoring, and testing of devnets;
  • Reduced development cycle --  accelerating the pace of innovation by decreasing the time it takes to test and deploy new releases for components like “bor,” “erigon” and “heimdall”.

Express-CLI is a pivotal component of the Polygon PoS v1 Testing Toolkit and a versatile tool that combines infrastructure-as-code with test scripts. It empowers developers to perform a wide range of tasks related to Polygon PoS devnets effortlessly. It can be used by every contributor to achieve any sort of test or participate in the further development of Polygon PoS. 

Let's delve into the advantages it brings across various use cases.

Testing New Features

Before Express-CLI, developers were grappling with the challenges of manually testing their features on a subset of Mumbai nodes. This process was labor-intensive, error-prone, and led to the compromise of the testnet infrastructure. With Express-CLI, developers can craft their own tests and seamlessly execute them against any remote devnet, simplifying testing procedures and mitigating the risks associated with manual testing.

Regression Tests

Express-CLI enables developers to remotely modify the versions of key components like “bor,” “erigon,” “heimdall,” “contracts,” or “genesis-contracts” and run a battery of tests. These include RPC tests, shadow nodes txs, load testing, end-to-end tests for contracts’ events on L1 and L2, smoke tests for stateSyncs and checkpoints, and even chaos testing. This ensures that new changes do not adversely impact previous versions, thus enhancing the stability of the platform.

Streamlined Devnet Deployment

Developers now have the capability to define environment variables and use Express-CLI commands to initialize remote machines, deploy a devnet and execute a myriad of end-to-end tests. This process is automated, cloud-agnostic (currently, you can use your machine as target for deployments, or AWS and GCP), and significantly faster than the manual deployment methods. Furthermore, Express-CLI can be used to directly spin up not only local/remote devnets (in a dockerized environment or not), but also testnet and mainnet nodes.

Smoother Release Processes

Express-CLI ensures that all tests are green on a devnet before deploying on testnet. What's more, Express-CLI has the potential to further automate this process by running tests on every commit/PR of the default branches for “bor,” “erigon” and “heimdall” using a remote permanent devnet.

Head over to our Github page to get started. Tune into the blog and our social channels to keep up with updates about the Polygon ecosystem.

Together, we can build an equitable future for all through the mass adoption of Web3!

Website | Twitter | Developer Twitter | Forum | Telegram | Reddit | Discord | Instagram | Facebook | LinkedIn

More from blogs