# Solidity Level 11: Testing

> Level 11: Testing of the LoWisa Solidity course: Unit and Integration Tests, Fuzz and Invariant Testing, Testing Adversarial Conditions. 3 lessons and 9 ideas, each explained in one line.

Testing is level 11 of 17 of the [LoWisa Solidity course](/courses/solidity/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Unit and Integration Tests

- **Test frameworks.** Contract suites run on frameworks like **Foundry**: tests in Solidity, fast, fork-capable.
- **State setup.** Tests build scenarios with **cheatcodes**: prank callers, warp time, deal balances.
- **Fork testing.** **Fork** tests run against real chain state: integrations proven against the actual protocols.

## Fuzz and Invariant Testing

- **Fuzzing.** **Fuzz** tests hammer functions with random inputs: the edge cases you did not imagine, found nightly.
- **Invariants.** **Invariant** tests assert what must always hold: total supply conserved across any call sequence.
- **Property mindset.** Security tests state **properties**: no sequence of calls may mint value from nothing.

## Testing Adversarial Conditions

- **Attacker contracts.** Suites include **attacker** contracts: reentering, reverting on receive, lying about returns.
- **Failure-path coverage.** Every revert path is **tested**: the error cases are the security surface.
- **Coverage honestly.** **Coverage** maps what never executed: untested branches in money code are unpriced risk.

## Before and after this level

- **Before:** [Level 10: Gas & EVM Efficiency](/courses/solidity/level-10-gas-and-evm-efficiency/): Gas Model, Storage and Execution Costs, Optimising Without Sacrificing Safety.
- **Next:** [Level 12: Cryptography & Signatures](/courses/solidity/level-12-cryptography-and-signatures/): Hashing and Signing, Message Verification, Authorisation Patterns.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does Solidity Level 11: Testing cover?

Unit and Integration Tests, Fuzz and Invariant Testing, Testing Adversarial Conditions: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 10: Gas & EVM Efficiency, which covers Gas Model, Storage and Execution Costs, Optimising Without Sacrificing Safety.

## Learn Solidity on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/solidity/level-11-testing/ · Updated 2026-11-30
