test-writing

Generate YaxUnit unit tests for 1C BSL code modules.

87|15|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/SteelMorgan/1c-agent-based-dev-framework --skill test-writing-steelmorgan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writing
Source: https://github.com/SteelMorgan/1c-agent-based-dev-framework/tree/main/framework/skills/bsl-practices/test-writing
Command: npx skills add https://github.com/SteelMorgan/1c-agent-based-dev-framework --skill test-writing-steelmorgan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of unit tests for 1C BSL code using the YaxUnit framework, ensuring code quality and maintainability.

Core Features & Use Cases

  • Test Module Generation: Creates structured BSL test modules following YaxUnit conventions.
  • Assertion & Mocking: Guides the agent on how to use YaxUnit's assertion library and Mockito for dependency mocking.
  • Use Case: When developing a new BSL module for inventory management, use this Skill to generate comprehensive unit tests that cover various scenarios like stock updates, item lookups, and price calculations, ensuring the module functions correctly before deployment.

Quick Start

Use the test-writing skill to create a new YaxUnit test module for the 'Справочник.Номенклатура' (Catalog.Nomenclature) object.

Frequently Asked Questions about test-writing

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

FAQPage Schema
How do I write unit tests for 1C BSL code using YaxUnit?

YaxUnit generates structured BSL test modules with assertions, Mockito mocking, and test data to isolate and verify business logic. This framework supports TDD methodologies by enforcing a structured approach to writing testable code.

How do I mock dependencies in BSL unit tests with YaxUnit?

Mocking dependencies in BSL unit tests is handled by integrating Mockito within the YaxUnit framework. This allows you to isolate modules, such as inventory management logic, by replacing external calls with controlled test data and mocked behaviors.

Can I use this approach to generate tests for complex 1C business logic?

Yes, generating YaxUnit tests for 1C business logic covers complex scenarios like stock updates, item lookups, and price calculations. It creates deterministic tests that verify modules function correctly across various data conditions.

What is the best way to structure a YaxUnit test module for a 1C catalog?

The best way to structure a YaxUnit test module for a 1C catalog is by following YaxUnit conventions for test data creation and assertions. This ensures isolated testing of objects like 'Справочник.Номенклатура' without affecting live data.

Does YaxUnit support TDD methodologies for 1C BSL development?

YaxUnit supports TDD methodologies by providing a structured approach to writing testable 1C BSL code. It facilitates test-first development through automated generation of test modules, assertions, and mock setups.