Giter Club home page Giter Club logo

yolodev.expecto.testsdk's Introduction

Expecto TestSdk integration

CI NuGet Status

Using Expecto with VSTest (dotnet test)

To use as the Expecto test adapter, add the following dependencies to your project:

Microsoft.NET.Test.Sdk
YoloDev.Expecto.TestSdk

If you're using the dotnet CLI, and it's built in package management, the following commands can be used to achive that. References can also be added using visual studio NuGet browser, or paket.

dotnet add package Microsoft.NET.Test.Sdk
dotnet add package YoloDev.Expecto.TestSdk

In addition, it might be nesesary to disable the automatic generation of a program.fs file by msbuild, depending on your target framework. To do so, set GenerateProgramFile to false in the fsproj file, as seen bellow:

<PropertyGroup>
  <GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>

To get the tests working in the Visual Studio test explorer, it's recommended to target netcoreapp2.2 or newer with your test projects. Others might work, but people have had problems with them.

Configuration

You can configure some of Expecto via dotnet test. dotnet test allows you to pass in RunSettings via the CLI or using a .runsettings file.

dotnet test RunSettings

From dotnet test cli help:

RunSettings arguments: Arguments to pass as RunSettings configurations. Arguments are specified as '[name]=[value]' pairs after "-- " (note the space after --). Use a space to separate multiple '[name]=[value]' pairs. See https://aka.ms/vstest-runsettings-arguments for more information on RunSettings arguments. Example: dotnet test -- MSTest.DeploymentEnabled=false MSTest.MapInconclusiveToFailed=True

Many of the ExpectoConfig settings are settable throughusing the CLI or .runsettings file. This test adapter uses the naming from Expecto's CLI arguments (without the leading --), namespaced with Expecto.. Additionally, any args that are switches must take a boolean value.

RunSettings Example:

dotnet test -- Expecto.parallel=false Expecto.fail-on-focused-tests=true Expecto.stress-memory-limit=120.0

yolodev.expecto.testsdk's People

Contributors

alxandr avatar gdziadkiewicz avatar jackfoxy avatar maxwilson avatar mnie avatar slang25 avatar theangrybyrd avatar

Watchers

 avatar  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.