Machine.Specifications alternatives and similar packages
Based on the "Testing" category.
Alternatively, view Machine.Specifications alternatives based on common mentions on social networks and blogs.
-
AutoFixture
AutoFixture is an open source framework for .NET designed to minimize the 'Arrange' phase of your unit tests -
Fluent Assertions
A set of .NET extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style test -
Shouldly
Shouldly is an assertion framework which focuses on giving great error messages when the assertion fails while being simple and terse. -
Compare-Net-Objects
Perform a deep compare of any two .NET objects using reflection. Shows the differences between the two objects. -
GenFu
GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them. -
Expecto
A smooth testing framework for F# with tests as values. Unit testing, property based testing, performance testing and stress testing. -
xBehave.net
A BDD/TDD framework based on xUnit.net and inspired by Gherkin. http://xbehave.github.io -
SpecsFor
SpecsFor is a light-weight Behavior-Driven Development framework that focuses on ease of use for *developers* by minimizing testing friction. -
LightBDD
BDD framework allowing to create easy to read and maintain tests. -
SimpleStubs
*SimpleStubs* is a simple mocking framework that supports Universal Windows Platform (UWP), .NET Core and .NET framework. SimpleStubs is currently developed and maintained by Microsoft BigPark Studios in Vancouver. -
ExpressionToCode
Use plain C# syntax in assertions that include both the expression expression and subexpression values in the failure message. -
snapshooter
Snapshooter is a snapshot testing tool for .NET Core and .NET Framework -
ArchUnitNET
Simple library for checking the architecture of C# code with a fluent API. -
Fine Code Coverage
Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too) -
CheckTestOutput
Semi-manual asserts for unit tests -
ReportPortal
AI-powered Test Automation Dashboard. Acquire, aggregate and analyze test reports to ascertain release health. -
NCrunch
An automated continuous & concurrent testing tool for Visual Studio. [$]
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Machine.Specifications or a related project?
README
Machine.Specifications
MSpec is called a "context/specification" test framework because of the "grammar" that is used in describing and coding the tests or "specs". The grammar reads roughly like this
When the system is in such a state, and a certain action occurs, it should do such-and-such or be in some end state.
You should be able to see the components of the traditional Arrange-Act-Assert
model in there. To support readability
and remove as much "noise" as possible, MSpec eschews the traditional attribute-on-method model of test construction.
Instead it uses custom delegates that you assign anonymous methods, and asks you to name them following a certain convention.
using Machine.Specifications;
[Subject("Authentication")]
class When_authenticating_an_admin_user
{
static SecurityService subject;
static UserToken user_token;
Establish context = () =>
subject = new SecurityService();
Because of = () =>
user_token = subject.Authenticate("username", "password");
It should_indicate_the_users_role = () =>
user_token.Role.ShouldEqual(Roles.Admin);
It should_have_a_unique_session_id = () =>
user_token.SessionId.ShouldNotBeNull();
}
Getting Started
- Create a .NET Framework or .NET Core library project.
- Install Nuget packages as follows:
Install-Package Machine.Specifications
- Install the test SDK and Visual Studio runner:
Install-Package Microsoft.NET.Test.SDK
Install-Package Machine.Specifications.Runner.VisualStudio
- Optionally, install the assert and mocking libraries:
Install-Package Machine.Specifications.Should
Install-Package Machine.Fakes
Documentation
For project documentation, please visit the wiki.
Training
A PluralSight course by @kevinkuebler is available here.
Get in touch
Discuss with us on Discussions, chat with us on Gitter, or raise an issue.
Packages
*Note that all licence references and agreements mentioned in the Machine.Specifications README section above
are relevant to that project's source code only.