
thomhurst/tunit
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
현대적이고 빠르며 유연한 .NET 테스트 프레임워크
개요
현대적인 .NET 테스트 프레임워크입니다. 테스트는 컴파일 시점에 소스 생성기를 통해 발견되고, 기본적으로 병렬로 실행되며, 모두 Microsoft.Testing.Platform에서 구축된 네이티브 AOT 하에서 작동합니다. TUnit 주장을 사용할 경우, 테스트가 실패하면 TUnit이 실제로 작성한 표현식을 포함해 무슨 일이 있었는지 알려줍니다: 객체를 비교하는 것? 두 개의 객체 그래프를 쏟아내는 대신, TUnit은 그 차이를 정확히 짚어냅니다: - — 테스트는 빌드 시점에 소스 생성기로 배선되며, 런타임 반사로 찾지 않습니다. 더 빠른 시작 시간, 더 나은 IDE 통합, 완전한 네이티브 AOT 및 트리밍 지원. - — Roslyn 분석기 세트가 기본 탑재되어 있어, 잘못된 훅 서명, 손상된 데이터 소스, 잘못 사용된 어설트 같은 실수는 빌드에 실패할 뿐 CI 실행에는 실패하지 않습니다. - — 테스트 즉시 동시에 실행됩니다; [DependsOn], [NotInParallel], [ParallelLimiter] 는 필요할 때 정확한 순서와 속도 제한을 제공합니다.
개요(AI 번역)
현대적인 .NET 테스트 프레임워크입니다. 테스트는 컴파일 시점에 소스 생성기를 통해 발견되고, 기본적으로 병렬로 실행되며, 모두 Microsoft.Testing.Platform에서 구축된 네이티브 AOT 하에서 작동합니다.
그 모습이 어떻게 보일까
TUnit 주장을 사용할 경우, 테스트가 실패하면 TUnit이 실제로 작성한 표현식을 포함해 무슨 일이 있었는지 알려줍니다:
객체를 비교하는 것? 두 개의 객체 그래프를 쏟아내는 대신, TUnit은 그 차이를 정확히 짚어냅니다:
왜 TUnit?
- 컴파일 시 테스트 발견 — 테스트는 빌드 시점에 소스 생성기에 의해 유선화되며, 런타임 반사를 통해 찾지 않습니다. 더 빠른 시작 속도, 더 나은 IDE 통합, 완전한 네이티브 AOT 및 트림 지원.
- 컴파일 시 안전성 — Roslyn 분석기 세트가 기본 탑재되어 있어, 잘못된 훅 서명, 깨진 데이터 소스, 잘못 사용된 주장 같은 실수는 빌드에 실패할 뿐, CI 실행에서는 실패하지 않습니다.
- 기본적으로 병렬, 실제로는 제어 — 테스트가 동시에 실행되며;
[DependsOn],[NotInParallel],[ParallelLimiter ]는 필요할 때 정확한 순서와 스로틀링을 제공합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
TUnit
A modern .NET testing framework. Tests are discovered at compile time via source generators, run in parallel by default, and work under Native AOT — all built on Microsoft.Testing.Platform.
What it looks like
[Test]
[Arguments("GOLD", 100.00, 80.00)]
[Arguments("SILVER", 100.00, 90.00)]
public async Task Discount_Is_Applied(string tier, double subtotal, double expected)
{
var checkout = new CheckoutService();
var total = await checkout.ApplyDiscountAsync(tier, subtotal);
await Assert.That(total).IsEqualTo(expected);
}
If using TUnit Assertions, when a test fails, TUnit tells you what happened — including the actual expression you wrote:
Expected to be 80
but found 100
at Assert.That(total).IsEqualTo(expected)
Comparing objects? Instead of dumping two object graphs at you, TUnit pinpoints the difference:
Expected to be equal to Employee { FirstName = "Victoria", LastName = "Apanii", Age = 30 }
but differs at member FirstName: expected "Victoria" but found "ictoria"
at Assert.That(actualEmployee).IsEqualTo(expectedEmployee)
Why TUnit?
- Compile-time test discovery — tests are wired up by a source generator at build time, not found via reflection at runtime. Faster startup, better IDE integration, and full Native AOT / trimming support.
- Compile-time safety — a suite of Roslyn analyzers ships in the box, so mistakes like invalid hook signatures, broken data sources, and misused assertions fail your build, not your CI run.
- Parallel by default, with real control — tests run concurrently out of the box;
[DependsOn],[NotInParallel], and[ParallelLimiter]give you precise ordering and throttling when you need it.
추천 도구
다른 키워드를 입력하거나 필터를 제거해 보세요.
설치
npx skillfish add thomhurst/tunit