drn-testing

Automate .NET test setup with auto-mocking, data-driven tests, and Testcontainers.

20|3|Updated Aug 13, 2023
One-click install
npx skills add https://github.com/duranserkan/DRN-Project --skill drn-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drn-testing
Source: https://github.com/duranserkan/DRN-Project/tree/main/.agent/skills/drn-testing
Command: npx skills add https://github.com/duranserkan/DRN-Project --skill drn-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DRN.Framework.Testing addresses the complexity of setting up robust tests by providing an integrated context and utilities for auto-mocking, data-driven tests, and containerized integration tests.

Core Features & Use Cases

  • Auto-mocking via NSubstitute
  • PostgreSQL testcontainers
  • WebApplicationFactory integration
  • Data-driven attributes and providers
  • Convention-based settings and data loading

Quick Start

Use DRN.Framework.Testing in your test projects to enable auto-mocking, containerized tests, and data-driven testing.

Frequently Asked Questions about drn-testing

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

FAQPage Schema
How do I set up auto-mocking for .NET unit testing with NSubstitute?

Auto-mocking for .NET unit testing with NSubstitute is automated by providing an integrated context that handles mock creation and injection, reducing manual setup. This allows tests to focus on behavior verification rather than mock configuration.

What is the best way to run containerized integration tests using PostgreSQL in .NET?

Containerized integration tests using PostgreSQL are supported through Testcontainers integration, which automatically provisions and tears down database containers. This ensures reliable, isolated test runs without requiring a persistent external database environment.

How does WebApplicationFactory integration work for testing .NET applications?

WebApplicationFactory integration works by providing a standardized context for bootstrapping .NET applications in-memory during tests. It enables end-to-end testing of HTTP pipelines and service registrations without deploying to a live web server.

Can I use data-driven test attributes and providers for .NET unit tests?

Yes, data-driven test attributes and providers are supported to supply test inputs dynamically. They allow loading test data based on conventions, enabling comprehensive parameterized testing across various scenarios without hardcoding values.

How do I apply convention-based settings and data loading for .NET integration tests?

Convention-based settings and data loading are applied through the testing framework's context providers, which automatically discover and load test data. This enforces reusable, reliable test configurations by following standardized naming and structural conventions.