bUnit-dev/bUnit
소개
bUnit은 일반 단위 테스트와 비슷한 방식과 느낌으로 작성하고 실행할 수 있는 Blazor 컴포넌트 테스트 라이브러리입니다. 테스트 대상 컴포넌트를 렌더링하고 수명 주기를 제어하거나, 매개변수를 전달하고 서비스를 주입하거나, 이벤트 핸들러를 실행할 수 있습니다. 내장된 시맨틱 HTML 비교기로 렌더링된 마크업을 검증할 수도 있습니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- +1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalbUnit - a testing library for Blazor components
bUnit is a testing library for Blazor Components. Its goal is to make it easy to write comprehensive, stable unit tests. With bUnit, you can:
- Setup and define components under tests using C# or Razor syntax
- Verify outcomes using semantic HTML comparer
- Interact with and inspect components as well as trigger event handlers
- Pass parameters, cascading values and inject services into components under test
- Mock
IJSRuntime, Blazor authentication and authorization, and others
bUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, MSTest and TUnit, which run the Blazor component tests in just the same way as any normal unit test. bUnit runs a test in milliseconds, compared to browser-based UI tests which usually take seconds to run.
Go to bUnit.dev to learn more.
NuGet Downloads
bUnit is available on NuGet in various incarnations. Most should just pick the bUnit package:
| Name | Description | NuGet Download Link |
|---|---|---|
| bUnit | Adds support for testing Blazor components. | |
| bUnit.template | Template, which currently creates xUnit-based bUnit test projects only. | |
| bUnit.generators | Source code generators to minimize code setup in various situations. | |
| bUnit.web.query | bUnit implementation of testing-library.com's query APIs. |
To get started, head to the getting started documentation to learn more.
bUnit and .NET version compatibility matrix
| bUnit version | .NET version |
|---|---|
| 1.x | ≥ .netcore3.1 && ≤ .net 9 |
| 2.x | ≥ .net8 |
For a migration guide, see Upgrading bUnit.
Sponsors
A huge thank you to the sponsors of bUnit. The higher tier sponsors are:
|
TestMu AI |
Contributors
Shout outs and a big thank you to all the contributors to the library, including those that raise issues, provide input to issues, and those who send pull requests. Thank you!
These good people have contributed code or documentation to bUnit:
Code of conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
.NET Foundation
This project is supported by the .NET Foundation.
관련 프로젝트 살펴보기
불러오는 중…