uninfe-test-creator
Create or evolve automated tests in source/UniNFe.Test for UniNFe services. Use when Codex needs to add tests for Task... service classes, regression tests…
by Unimake★ 18 GitHub stars
Install uninfe-test-creator in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
UniNFe test creator
Goal
Create test files for UniNFe with minimal duplication, following current project patterns in source/UniNFe.Test.
Use existing abstractions as the default approach:
UniNFe.Test.Abstractions.TaskTestFixtureBaseUniNFe.Test.Abstractions.TaskTestContextBase- domain fixture pattern, for example
eBoleto/EBoletoTestFixture.cs
Mandatory project assumptions
- Solution:
source/uninfe.sln - Test project:
source/UniNFe.Test/UniNFe.Test.csproj - Runtime compatibility: .NET Framework 4.8.1
- Keep tests compatible with the C# style used by the repository.
Required structure and conventions
- Use xUnit attributes:
[Fact],[Theory], and[InlineData]. - Prefer domain fixture plus context over inline setup in each test class.
- Reuse
TaskTestFixtureBasefor thread-based execution, polling/waiting for generated files, and XML-loading helpers. - Reuse
TaskTestContextBasefor temporary folders, setup/restore of global UniNFe static state, and input-file creation. - For domains with static/global side effects, define a serial test collection:
[CollectionDefinition("<Domain> Serial", DisableParallelization = true)]
[Collection("<Domain> Serial")]
- Keep assertions objective and behavior-oriented.
- Keep Portuguese messages for user-facing assertions/log expectations when applicable.
Pure deterministic tests of an internal decision helper do not need a fixture or context when they do not execute a task, mutate global state, create files, use certificates, or invoke transport. Such tests complement rather than replace task execution tests when file-processing behavior changes.
File placement pattern
- Abstractions:
source/UniNFe.Test/Abstractions/*.cs - Domain fixtures:
source/UniNFe.Test/<Domain>/<Domain>TestFixture.cs - Domain tests:
source/UniNFe.Test/<Domain>/*Tests.cs - Bugfix tests:
source/UniNFe.Test/<Domain>/BugFixes/<id>/BugFix<id>.cs, or the existing bugfix layout already in use
Implementation workflow
- Identify the existing domain fixture and collection.
- If the test executes a task and no fixture exists, create one inheriting from
TaskTestFixtureBase. - If setup is repeated, move it to a context class inheriting from
TaskTestContextBase. - Create or adjust tests to consume fixture context via
using (...)to guarantee cleanup. - Build and run targeted tests.
- If shared static behavior causes flaky tests, force a serial collection for that domain.
XML/file-based task testing checklist
When testing service tasks that process input XML and generate output files:
- Create realistic input XML based on schema constraints used by the task.
- Set expected extensions using
Propriedade.Extensao(...)contracts. - Execute the task in a named thread if
Empresas.FindEmpresaByThread()is used. - Assert output-file existence.
- Assert input-file deletion or move behavior expected by the task.
- Validate key return XML nodes:
Status,Motivo, and task-specific fields.
Guardrails
- Do not introduce new test frameworks.
- Do not refactor production code unless explicitly requested.
- Do not break external file-naming contracts.
- Do not duplicate fixture setup already available in abstractions.
- Do not rely on interactive scripts.
Validation commands
Build the solution or the impacted project when possible:
dotnet build source/uninfe.sln --no-restore
Run only impacted test types when possible.
Output expectations
When using this skill, produce:
- fixture/context updates, if needed;
- test classes using shared abstractions;
- build and targeted test execution results;
- short summary of what was created and where.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- agents/openai.yaml
FAQ
What does the uninfe-test-creator skill do?
Create or evolve automated tests in source/UniNFe.Test for UniNFe services. Use when Codex needs to add tests for Task... service classes, regression tests, fixtures, contexts, or reusable test setup while preserving .NET Framework 4.8.1 and existing xUnit patterns.
How do I install the uninfe-test-creator skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the uninfe-test-creator skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…