testing

Automate Foundry-based unit, fuzz, fork, and invariant tests for Solidity contracts.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/involvex/aetheris --skill testing-involvex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/involvex/aetheris/tree/main/.agents/skills/ethskills/testing
Command: npx skills add https://github.com/involvex/aetheris --skill testing-involvex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers in applying comprehensive smart contract testing with Foundry, covering unit tests, fuzz testing, fork testing, and invariant testing to uncover edge-case bugs before deployment.

Core Features & Use Cases

  • Unit Testing with Foundry: Validate core functionality and edge cases without tautologies.
  • Fuzz Testing: Automatically fuzz inputs to reveal unexpected behaviors and invariants.
  • Fork Testing: Reproduce real-state scenarios by forking mainnet or other networks to test integrations.
  • Invariant Testing: Define and verify properties that must hold across random sequences of interactions.
  • Best Practices: Provide patterns for structuring tests, avoiding common pitfalls, and ensuring deterministic outcomes.

Quick Start

Run forge test to execute the unit tests, fuzz tests, fork tests, and invariant tests against your Solidity contracts.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Foundry tests for Solidity smart contracts?

Foundry tests for Solidity smart contracts are written to validate core functionality, avoid tautologies, and ensure deterministic outcomes. You can execute all unit, fuzz, fork, and invariant tests by running the forge test command against your project.

What is fuzz testing in Foundry and when should I use it?

Fuzz testing in Foundry is a technique that automatically fuzzes inputs to reveal unexpected behaviors and verify invariants. You should use fuzz testing to uncover edge-case bugs in your Solidity contracts before deployment.

Can I test external protocol integrations using Foundry fork testing?

Yes, you can test external protocol integrations using Foundry fork testing. Fork testing reproduces real-state scenarios by forking mainnet or other networks, allowing you to test complex interactions against actual protocol states.

How does invariant testing work for smart contracts?

Invariant testing for smart contracts works by defining and verifying specific properties that must hold true across random sequences of interactions. This ensures your Solidity contract maintains expected behaviors under complex interaction scenarios.

What are the best practices for structuring Foundry tests?

Best practices for structuring Foundry tests involve applying patterns that avoid common pitfalls, ensure deterministic outcomes, and prevent tautologies. This approach provides robust verification for Solidity projects requiring comprehensive edge-case coverage.