PowerShell/test/xUnit
dependabot-preview[bot] 2d2fb8d702
Bump XunitXml.TestLogger from 2.1.45 to 3.0.56 (#14682)
Bumps [XunitXml.TestLogger](https://github.com/spekt/xunit.testlogger) from 2.1.45 to 3.0.56.
- [Release notes](https://github.com/spekt/xunit.testlogger/releases)
- [Changelog](https://github.com/spekt/xunit.testlogger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spekt/xunit.testlogger/compare/v2.1.45...v3.0.56)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-01 15:01:45 -08:00
..
Asserts Enable CA1050: Declare types in namespaces (#13872) 2020-10-26 22:34:26 +05:00
csharp Enable CA1822: Mark private members as static (#13897) 2020-12-09 11:04:23 -08:00
README.md Fix broken urls (#8653) 2019-01-15 16:20:45 -08:00
xunit.runner.json Make xUnit tests run sequentially to avoid race conditions caused by manipulating 'powershell.config.json' in tests (#8945) 2019-02-22 11:57:10 -08:00
xUnit.tests.csproj Bump XunitXml.TestLogger from 2.1.45 to 3.0.56 (#14682) 2021-02-01 15:01:45 -08:00

xUnit Tests

The folder contains xUnit tests for PowerShell Core project.

Running xUnit Tests

Go to the top level of the PowerShell repository and run full set of tests: Start-PSxUnit inside a self-hosted copy of PowerShell.

Go to the test project folder and run dotnet test -c Release.

Use filter parameter to run only needed tests:

dotnet test -c Release --filter "FullyQualifiedName~UnitTest1   # Runs tests which have UnitTest1 in FullyQualifiedName
dotnet test --filter Name~TestMethod1   # Runs tests whose name contains TestMethod1

Creating xUnit Tests

Keep the folder structure that is for Pester ../../test/powershell and C# files ../../src.

Use namespace names started with PSTests.

namespace PSTests.YourNameSpace
{
}