What problem does it solve?
This Skill helps you write and maintain dependable Perl test suites by guiding you through TDD, modern assertions, test organization, mocking, and coverage so failures are easier to diagnose and recurring regressions are prevented.
Core Features & Use Cases
- Test2::V0 assertion patterns: Use richer deep comparisons, builders (hash/array/bag), and clearer diagnostics for complex data structures.
- Test::More fundamentals: Apply established assertions like is/isnt, ok, is_deeply, like/unlike, and type helpers (isa_ok/can_ok).
- TDD workflow: Follow RED-GREEN-REFACTOR with concrete examples of writing failing tests, implementing minimal behavior, then refactoring while keeping tests green.
- Test execution & structure with prove: Organize tests in a practical directory layout and run them consistently with prove.
- Mocking external dependencies: Mock packages and verify call counts to isolate your code from network, databases, and other boundaries.
- Coverage with Devel::Cover: Measure and enforce coverage expectations for business logic paths and integration behavior.
- Common best practices: Keep tests fast, independent, and robust (subtests, isolation, done_testing correctness, and boundary/edge-case coverage).
Quick Start
Use the perl-testing skill to set up a Perl test file using Test2::V0 subtests, then run it with prove to confirm behavior and get actionable diagnostics on failures.