Fundamentos do Fluxo de Testes — Forge College

How to ensure that changes to Solidity contracts don't introduce regressions in production? Understanding and automating a test flow is essential for speed and security in smart contract projects. What you will learn: In this lesson, we explain, in practical terms, the role of a test flow and how automation connects testing to version control and deployment locks. You will see the difference between unit, integration, and system tests in a Solidity project, and how to map each type to stages of a continuous integration pipeline that runs on each branch and pull request. We cover when to use mocks versus real dependencies, what artifacts (reports, lcov, JSON) tests produce, and how to measure coverage (e.g., solidity-coverage) to guide test design. We also analyze a minimal Hardhat test example with Mocha and ethers to show what a pipeline actually executes and reports. Who this content is for: Advanced content for smart contract developers who already know Solidity and have hands-on experience with deployments and basic testing (Hardhat, Truffle, or similar). Ideal for those who want to transform manual checks into a repeatable and reliable pipeline. Main topics covered: Definition and responsibilities of an automated test flow Practical difference between unit, integration, and system tests When to use mocks and when to test against real dependencies Minimal Hardhat + Mocha + ethers example and line-by-line explanation of what is checked Measurement of coverage and CI artifacts (lcov, JSON reports) and how they influence test design CI orchestration: commands, artifacts, feedback in pull requests, and merge rules Want to apply this to your project and see practical exercises? Access https://www.forge.college/