Breakdance is a testing framework for managing the dangerous dance of shipping public APIs. This package helps generate public API reports for any .NET assembly, and compare them against a prior unit test run. That way, if something in the API surface changed, the unit test will fail. Commonly used types: CloudNimble.Breakdance.Assemblies.BreakdanceTestBase CloudNimble.Breakdance.Assemblies.ClaimsPrincipalTestHelpers CloudNimble.Breakdance.Assemblies.DependencyInjectionTestHelpers CloudNimble.Breakdance.Assemblies.PublicApiHelpers


Keywords
breakdance, csharp, fluentassertionsnetcore, mstest, netstandard, nunit, tests, unit, xunit, dotnet, microsoft, nuget, restier, testing-framework
License
MIT
Install
Install-Package Breakdance.Assemblies -Version 7.0.0-CI-20240404-201039

Documentation

Breakdance - by CloudNimble


A testing framework for managing the dangerous dance of shipping public APIs. Built by @CloudNimble.

Breakdance Logo

Website     |     Releases    |     Documentation    

Build Status Release Status Twitter

Introduction

Managing breakage in public APIs is a HUGE pain in the ass. With the current tools, you never really know when you're going to break someone. And with NuGet making weak references mainstream, even Microsoft breaks people... sometimes without realizing it for months.

It's time to change all that. Breakdance integrates surface testing into your build and deployment process, in just a few lines of code. Instead of waiting until GitHub issues break your inbox, Breakdance will break YOUR build first, forcing you to make critical decisions about how to keep your customers happy BEFORE they grab their pitchforks.

Components

  • Breakdance.AspNetCore: ASP.NET Core assemblies.
  • Breakdance.Assemblies: .NET assemblies.
  • Breakdance.Blazor: Blazor assemblies.
  • Breakdance.WebApi: WebApi services.
  • Breakdance.OData: OData services.
  • Breakdance.Restier: Restier-based OData services.

Ecosystem

Project Release Latest Description
Breakdance.AspNetCore bd-aspnetcore-rtm bd-aspnetcore-ci ASP.NET Core assemblies.
Breakdance.AspNetCore.SignalR bd-aspnetcore-sigr-rtm bd-aspnetcore-sigr-ci ASP.NET Core assemblies for SignalR
Breakdance.Assemblies bd-assemblies-rtm bd-assemblies-ci .NET assemblies.
Breakdance.Blazor bd-blazor-rtm bd-blazor-ci Blazor assemblies.
Breakdance.Extensions.MSTest2 bd-mstest-rtm bd-mstest-ci Microsoft Test assemblies.
Breakdance.Tools bd-tools-rtm bd-tools-ci CLI tools for Breakdance.
Breakdance.WebApi bd-webapi-rtm bd-webapi-ci WebApi services.

Installation

You can install Testier from NuGet by opening up Package Manager and typing install-package CloudNimble.Breakdance -pre. Please note that the current version requires CloudNimble's flavor of Restier, which we are currently shipping because Microsoft has not officially updated their NuGet packages for quite some time.

Using Breakdance

[TBD]

Assembly-Level Tests

[TBD]

WebApi Tests

[TBD]

WebApi OData Tests

[TBD]

Restier Tests

Because Restier uses a set of built-in conventions to reflect over your API and automagically find the methods it needs, it can be difficult to know what methods the system is expecting to find.

Testier uses a copy of the same convention lookup code, and the same method naming patterns, to generate a list of all possible method names. It can also generate a "Visibility Matrix" for your API, showing you which ones it expected, and which ones it found. That matrix looks something like this:

--------------------------------------------------
Function Name                            |   Found
--------------------------------------------------
CanInsertPlayers                         |   False
CanUpdatePlayers                         |   False
CanDeletePlayers                         |   False
OnInsertingPlayers                       |   False
OnUpdatingPlayers                        |   False
OnDeletingPlayers                        |   False
OnFilterPlayer                           |   False
OnInsertedPlayers                        |   False
OnUpdatedPlayers                         |   False
OnDeletedPlayers                         |   False
CanInsertSports                          |   False
CanUpdateSports                          |   False
CanDeleteSports                          |   False
OnInsertingSports                        |   False
OnUpdatingSports                         |   False
OnDeletingSports                         |   False
OnFilterSport                            |    True
OnInsertedSports                         |    True
OnUpdatedSports                          |   False
OnDeletedSports                          |   False
CanInsertTeams                           |   False
CanUpdateTeams                           |   False
CanDeleteTeams                           |   False
OnInsertingTeams                         |   False
OnUpdatingTeams                          |   False
OnDeletingTeams                          |   False
OnFilterTeam                             |   False
OnInsertedTeams                          |   False
OnUpdatedTeams                           |   False
OnDeletedTeams                           |   False
CanExecuteTestMethod                     |   False
OnExecutingTestMethod                    |   False
OnExecutedTestMethod                     |   False
--------------------------------------------------

The included unit tests show how to take this information, and build tests that compare a baseline against your current version. That way, if something changes, your tests break, and you're forced to understand what changed.

Swagger Tests

[TBD]

Known Issues

  • Testier can't currently map OData functions that are bound to datasets. If you know how to do this, please feel free to submit a PR.

Feedback

Feel free to send us feedback on Twitter or file an issue. Feature requests are always welcome. If you wish to contribute, please take a quick look at the contribution guidelines.

Code of Conduct

Please adhere to our Code of Conduct during any interactions with CloudNimble team members and community members. It is strictly enforced on all official CloudNimble repositories, websites, and resources. If you encounter someone violating these terms, please let us know via DM on Twitter or via email at opensource@nimbleapps.cloud and we will address it as soon as possible.

Contributors

Thank you to all the people who have contributed to the project: Source code Contributors

Please visit our Contribution document to start contributing to our project.