generate-tests

Generates comprehensive test suites for Move smart contracts with 100% coverage verification via aptos move test --coverage.

19|8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/aptos-labs/aptos-agent-skills --skill generate-tests-aptos-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-tests
Source: https://github.com/aptos-labs/aptos-agent-skills/tree/main/skills/move/generate-tests
Command: npx skills add https://github.com/aptos-labs/aptos-agent-skills --skill generate-tests-aptos-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical need for comprehensive testing of Move smart contracts, ensuring 100% line coverage to prevent bugs and security vulnerabilities before deployment.

Core Features & Use Cases

  • Automated Test Generation: Creates detailed test suites covering happy paths, access control, input validation, and edge cases.
  • Coverage Verification: Guides users to achieve and verify 100% test coverage using aptos move test --coverage.
  • Use Case: After writing a new Move smart contract for an NFT marketplace, use this skill to automatically generate a robust test suite that verifies all functionalities, access controls, and potential failure points, guaranteeing a secure and reliable contract.

Quick Start

Use the generate-tests skill to create a comprehensive test suite for the 'my_module' Move contract.

Frequently Asked Questions about generate-tests

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

FAQPage Schema
How do I generate test suites for Move smart contracts to ensure 100% line coverage?

To generate test suites for Move smart contracts, you can use automated tooling that creates test modules covering happy paths, access control, input validation, and edge cases. This process enforces 100% line coverage to prevent bugs and vulnerabilities before deployment.

What is the best way to verify test coverage for Aptos Move contracts?

The best way to verify test coverage for Aptos Move contracts is by running the command `aptos move test --coverage`. This command checks your generated test suite to ensure that all contract functionalities and failure points are fully tested, confirming 100% line coverage.

Does automated Move contract testing cover access control and edge cases?

Yes, automated Move contract testing covers access control and edge cases. The generated test suites are designed to comprehensively verify input validation, error paths, and access controls, guaranteeing that critical security rules and 100% coverage mandates are met.

How do I test error paths and input validation in my Move smart contract?

You can test error paths and input validation in a Move smart contract by generating a comprehensive test suite. This involves creating test modules that specifically target potential failure points and access control limits, guiding you through verification to achieve 100% line coverage.

When do I need to generate comprehensive tests for my Move module?

You need to generate comprehensive tests for your Move module after writing a new smart contract, such as for an NFT marketplace. Generating a robust test suite immediately verifies all functionalities, access controls, and potential failure points, guaranteeing a secure and reliable contract before deployment.