The ability to succeed failing test cases in the testing phase has been reserved VW. Until now.
With xUnit VW Extension, you - the developer - will now be able to circumvent the obstruction known as "continuous integration tools". xUnit VW Extension enables you to emit more code to the world, which is your ultimate goal as a developer! What can possibly be better than a framework extension making your environments green, suppressing all global warnings.
xUnit VW Extension is, as the name implies, an extension to the xUnit testing tool. It is easy to install, easy to use, and does not interfere with your day to day work. Your development environment will be untouched.
This project is in no way affiliated with the xUnit project. I'm just a fan who wanted to make an extension to that awesome tool.
Any connections to a multinational automobile company are purely coincidental.
You can see the full example here!
using Xunit;
using Assert = Xunit.VW.Assert;
public class VWTest
{
[Fact]
public void EmissionTests()
{
const int Emissions = 9001;
const int LegalLimit = 1337;
Assert.InRange(Emissions, 0, LegalLimit);
}
}
Running all of the tests in this project using Visual Studio 2013 in a development environment gives the following result:
Running in a CI environment like Appveyor gives a different result:
You can install xUnit VW Extension with NuGet. In order to install a version compatible with xUnit 2.0.0, type:
Install-Package xunit.vw.extension -Version 2.0.0
In order to install a version compatible with xUnit 2.1.0, type:
Install-Package xunit.vw.extension -Version 2.1.0
To add xUnit VW Extension to your project, simply add the following line to your usages:
using Assert = Xunit.VW.Assert;
- TravisCI
- Appveyor
- Bamboo
- Buildkite
- GitlabCI
- Go CD
- Hudson
- Jenkins
- TeamCity
- Team Foundation Server
Additional CI tools may be supported, if they are using environment variables like BUILD_ID
or CI
.
For now only .NET45 is tested. Support for additional versions of the framework will be added by demand.
This project is, as the observant reader may have noticed, heavily influenced by phpunit-vw. I felt that the .NET world also deserved such a wonderful tool, and ported it.
The build scripts are borrowed from LightInject.
So you have found a bug, or just want to take a look under the hood?
Great!
Simply open an issue, do your thing, and come back with a pull request. All contributions are greatly appreciated!
xUnit VW Extension is available under the MIT license.
xUnit It is part of the ASP.NET Open Source Gallery under the Outercurve Foundation, licensed under Apache 2.