Giter Site home page Giter Site logo

bpugh / bunit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bunit-dev/bunit

0.0 1.0 0.0 5.57 MB

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.

Home Page: https://bunit.dev

License: MIT License

C# 98.33% PowerShell 0.04% CSS 0.01% HTML 1.63%

bunit's Introduction

GitHub tag 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 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, and MSTest, 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 Includes the bUnit.core and bUnit.web packages. Nuget
bUnit.core Core library that enables rendering a Blazor component in a test context. Nuget
bUnit.web Adds support for testing Blazor components for the web. This includes bUnit.core. Nuget
bUnit.template Template, which currently creates 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
@syncfusion
Syncfusion
Hassan Rezk Habib (@hassanhabib)
Hassan Rezk Habib

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.

bunit's People

Contributors

anddrzejb avatar bunitbot avatar christian-oleson avatar danielabbatt avatar darthpedro avatar denisekart avatar dependabot[bot] avatar duracellko avatar edcharbeneau avatar egil avatar hamedmoghadasi avatar iambacon avatar icnocop avatar ivanrainbolt avatar jeroenbos-testserviceuser avatar jgoday avatar joro550 avatar kasperhesthaven avatar kristofferstrube avatar kurnakovv avatar lewis-allen avatar linkdotnet avatar msynk avatar pharry22 avatar rodolfograve avatar samtrion avatar simoncropp avatar siphonophora avatar thalaeg avatar ventigrande avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.