cognito-unit-test

Build Cognito Forms unit tests with MSTest, Autofac DI, and TestStore.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/jacobrocks1212/claude-config --skill cognito-unit-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cognito-unit-test
Source: https://github.com/jacobrocks1212/claude-config/tree/main/repos/cognito-forms/.claude/skills/cognito-unit-test
Command: npx skills add https://github.com/jacobrocks1212/claude-config --skill cognito-unit-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cognito Forms unit testing can be verbose and brittle. This skill provides a repeatable scaffold using MSTest patterns, a BaseTest infrastructure with Autofac DI and TestStore, enabling realistic integration tests rather than mocks.

Core Features & Use Cases

  • Unit test scaffolding for Cognito Forms projects using MSTest.
  • BaseTest-driven DI with Autofac and TestStore for realistic integration scenarios.
  • Org data loading via [Org("OrgCode")] to load TestFiles data; override services with MockService<T>().
  • Clear naming conventions and runnable test commands via dotnet test.
  • Workflows include unit tests, integration tests, and test data sets.

Quick Start

Create a new MSTest class that inherits BaseTest and implement a test using FormsService and the TestStore.

Frequently Asked Questions about cognito-unit-test

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

FAQPage Schema
How do I write Cognito Forms unit tests using MSTest?

Cognito Forms unit tests using MSTest are built by creating test classes that inherit from BaseTest, leveraging Autofac DI and TestStore to produce reliable, maintainable test scaffolding for realistic integration scenarios.

How does TestStore and Autofac DI work for Cognito Forms integration tests?

TestStore and Autofac DI enable realistic integration tests by loading test organizations via the [Org("OrgCode")] attribute and providing a BaseTest infrastructure to override services using MockService<T>().

What's the best way to structure Cognito Forms test data for automated tests?

Structure Cognito Forms test data by loading test organizations through the [Org("OrgCode")] attribute, which pulls defined data sets from TestFiles into the TestStore for reliable execution.

Can I override services in Cognito Forms MSTest scenarios?

Yes, you can override services in Cognito Forms MSTest scenarios by calling MockService<T>() within your BaseTest class to replace dependencies with customized mocks for testing.

Do I need dotnet test to run MSTest patterns for Cognito Forms?

Yes, you need dotnet test to run MSTest patterns for Cognito Forms, executing the runnable test commands generated by the BaseTest naming conventions across unit and integration layers.