All Projects → egil → Bunit

egil / Bunit

Licence: mit
A testing library for Blazor Components. You can easily define components under test in C# or Razor syntax and verify outcome using semantic HTML diffing/comparison logic. You can easily interact with and inspect components, trigger event handlers, provide cascading values, inject services, mock IJSRuntime, and perform snapshot testing.

Projects that are alternatives of or similar to Bunit

bUnit
bUnit is a testing library for Blazor components that make tests look, feel, and runs like regular unit tests. bUnit makes it easy to render and control a component under test’s life-cycle, pass parameter and inject services into it, trigger event handlers, and verify the rendered markup from the component using a built-in semantic HTML comparer.
Stars: ✭ 857 (+106.51%)
Mutual labels:  unit-testing, snapshot-testing, nunit
Nunit
NUnit 3 Framework
Stars: ✭ 2,131 (+413.49%)
Mutual labels:  hacktoberfest, nunit
Nunit Console
NUnit Console runner and test engine
Stars: ✭ 168 (-59.52%)
Mutual labels:  hacktoberfest, nunit
Alsatian
TypeScript testing framework with test cases
Stars: ✭ 244 (-41.2%)
Mutual labels:  hacktoberfest, unit-testing
Stryker4s
Mutation testing for Scala. Work in progress...
Stars: ✭ 118 (-71.57%)
Mutual labels:  hacktoberfest, unit-testing
Specflow
#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
Stars: ✭ 1,827 (+340.24%)
Mutual labels:  hacktoberfest, nunit
Mockbukkit
MockBukkit is a mocking framework for bukkit to allow the easy unit testing of Bukkit plugins.
Stars: ✭ 186 (-55.18%)
Mutual labels:  hacktoberfest, unit-testing
Php Censor
PHP Censor is an open source self-hosted continuous integration server for PHP projects.
Stars: ✭ 619 (+49.16%)
Mutual labels:  hacktoberfest, unit-testing
FakeItEasy.AutoFakeIt
A very simple, yet flexible, "AutoFaker" for FakeItEasy to easily auto generate classes with faked dependencies.
Stars: ✭ 15 (-96.39%)
Mutual labels:  unit-testing, nunit
meeting-app-unit-tests-playground
Unit tests patterns when using JEST and Vue2 (vue-test-utils)
Stars: ✭ 21 (-94.94%)
Mutual labels:  unit-testing, snapshot-testing
json-snapshot.github.io
Snapshot Testing for Java
Stars: ✭ 28 (-93.25%)
Mutual labels:  unit-testing, snapshot-testing
Atoum
The modern, simple and intuitive PHP unit testing framework.
Stars: ✭ 1,382 (+233.01%)
Mutual labels:  hacktoberfest, unit-testing
Rubberduck
Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
Stars: ✭ 1,287 (+210.12%)
Mutual labels:  hacktoberfest, unit-testing
Android Client
An android client for the MifosX platform
Stars: ✭ 150 (-63.86%)
Mutual labels:  hacktoberfest, unit-testing
Awesome Android Kotlin Apps
👓 A curated list of awesome android kotlin apps by open-source contributors.
Stars: ✭ 1,058 (+154.94%)
Mutual labels:  hacktoberfest, unit-testing
Fluentassertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, .NET Core 2.1 and 3.0, as well as .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.
Stars: ✭ 2,449 (+490.12%)
Mutual labels:  hacktoberfest, unit-testing
Enzyme To Json
Snapshot test your Enzyme wrappers
Stars: ✭ 954 (+129.88%)
Mutual labels:  unit-testing, snapshot-testing
Aspnetcore Tests Sample
A project to help demonstrate how to do unit, integration and acceptance tests with an web api project using ASP.NET Core and Angular 7 front end.
Stars: ✭ 40 (-90.36%)
Mutual labels:  unit-testing, nunit
Pg Mem
An in memory postgres DB instance for your unit tests
Stars: ✭ 350 (-15.66%)
Mutual labels:  hacktoberfest, unit-testing
Cake
🍰 Cake (C# Make) is a cross platform build automation system.
Stars: ✭ 3,154 (+660%)
Mutual labels:  unit-testing, nunit

GitHub tag (latest SemVer pre-release) Nuget Issues Open Gitter

bUnit - 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 outcome using semantic HTML comparer
  • Interact with and inspect components as well as triggering event handlers
  • Pass parameters, cascading values and inject services into components under test
  • Mock IJsRuntime and Blazors authentication and authorization
  • Perform snapshot testing

bUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, and MSTest, which runs the Blazor components tests just as any normal unit test.

Go to bUnit.egilhansen.com to learn more.

NuGet Downloads

bUnit is available on NuGet in various incarnations. If you are using xUnit as your general purpose testing framework, you can use bunit, which includes everything in one package. If you want to use NUnit or MStest, then pick bunit.core and bunit.web:

Name Description NuGet Download Link
bUnit.web Adds support for testing Blazor components for the web. This includes bUnit.core. Nuget
bUnit.xUnit Adds additional support for using bUnit with xUnit, including support for Razor-based tests. Nuget
bUnit.core Core library that enables rendering a Blazor component in a test context. Nuget
bUnit.template Template, which currently creates an xUnit based bUnit test projects only Nuget

To get started, head to the getting started documentation to learn more.

Sponsors

A huge thank you to the sponsors of my work with bUnit. The higher tier sponsors are:

@Progress-Telerik
Progress-Telerik
Hassan Rezk Habib (@hassanhabib)
Hassan Rezk Habib (@hassanhabib)

Milestones to v1.0.0

These are the current goals that should be reached before v1.0.0 is ready:

  • Stabilize the APIs, such that they work equally well with both xUnit, NUnit, and MSTest as the underlying test framework. The general goals are to make it easy for developers to create the tests they need, and to fall into the pit of success.
  • Get the Razor-based testing to be stable, e.g. make the discovery and running of tests defined in .razor files stable and efficient. This includes adding support for NUnit and MSTest as test runners.
  • Improve the documentation. It’s a good idea to get an experienced technical editor to review the documentation, making sure it is clear and understandable. In addition to this, more ‘How to’ guides are planned in the Update Docs milestone.
  • Join the .NET Foundation.. This project is too large for one person to be the owner and the sole maintainer, so the plan is to apply for membership as soon as possible - most likely close to or after v1.0.0 ships - and to get the required support and guidance to ensure the project long term.

In the post-v1.0.0 to v1.0.x time frame, focus will be on improving performance. In particular, it would be nice to reduce the spin-up time of about one second.

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!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].