Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for xUnit.v3 #3097

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Playwright.TestAdapter/PlaywrightSettingsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,8 @@ private static void ValidateBrowserName(string browserName, string fromText, str
}

public void Load(XmlReader reader)
=> _settings = new PlaywrightSettingsXml(reader);
{
_settings = new PlaywrightSettingsXml(reader);
Console.Error.WriteLine("Loading settings with pid: " + System.Diagnostics.Process.GetCurrentProcess().Id + " and browser name " + BrowserName);
}
}
28 changes: 28 additions & 0 deletions src/Playwright.TestingHarnessTest/ExampleTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;

Check warning on line 1 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary.
using System.Threading.Tasks;
using Microsoft.Playwright.TestAdapter;

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check warning on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary.

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 3 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'TestAdapter' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)
using Microsoft.Playwright.Xunit.v3;

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)

Check failure on line 4 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'Xunit' does not exist in the namespace 'Microsoft.Playwright' (are you missing an assembly reference?)
using Playwright.TestingHarnessTest.Xunit;
using Xunit;

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 6 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)
using Xunit.Sdk;

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 7 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)
using Xunit.v3;

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 8 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

namespace Playwright.TestingHarnessTest.Xunit;

public class xunitv3basicspectsshouldbeabletosetthebrowserviatherunsettingsfile : PageTest

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 12 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'PageTest' could not be found (are you missing a using directive or an assembly reference?)
{
private readonly ITestOutputHelper output;

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

public xunitv3basicspectsshouldbeabletosetthebrowserviatherunsettingsfile(ITestOutputHelper output)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 16 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'ITestOutputHelper' could not be found (are you missing a using directive or an assembly reference?)
{
this.output = output;
}

[Fact]

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/macos-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/macos-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/ubuntu-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/ubuntu-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/macos-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/ubuntu-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / chromium/windows-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / firefox/windows-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'FactAttribute' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 21 in src/Playwright.TestingHarnessTest/ExampleTests.cs

View workflow job for this annotation

GitHub Actions / webkit/windows-latest

The type or namespace name 'Fact' could not be found (are you missing a using directive or an assembly reference?)
public async Task Test()
{
await Page.GotoAsync("about:blank");
if (BrowserName != "webkit")
throw new XunitException("Expected webkit but got: " + BrowserName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,36 @@
<ReleaseVersion>0.0.0</ReleaseVersion>
<LangVersion>12</LangVersion>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="../Common/SignAssembly.props" />

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />

<!-- MSTest -->
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" Condition="'$(TEST_MODE)' == 'mstest'" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" Condition="'$(TEST_MODE)' == 'mstest'" />

<!-- NUnit -->
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" Condition="'$(TEST_MODE)' == 'nunit'" />

<!-- xUnit -->
<PackageReference Include="xunit" Version="2.9.2" Condition="'$(TEST_MODE)' == 'xunit'" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" Condition="'$(TEST_MODE)' == 'xunit'" />

<!-- xUnit.v3 -->
<PackageReference Include="xunit.v3" Version="1.0.1" Condition="'$(TEST_MODE)' == 'xunit.v3'" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1" Condition="'$(TEST_MODE)' == 'xunit.v3'" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Playwright\Playwright.csproj" />
<ProjectReference Include="..\Playwright.MSTest\Playwright.MSTest.csproj" />
<ProjectReference Include="..\Playwright.NUnit\Playwright.NUnit.csproj" />
<ProjectReference Include="..\Playwright.Xunit\Playwright.Xunit.csproj" />
<ProjectReference Include="..\Playwright.MSTest\Playwright.MSTest.csproj" Condition="'$(TEST_MODE)' == 'mstest'" />
<ProjectReference Include="..\Playwright.NUnit\Playwright.NUnit.csproj" Condition="'$(TEST_MODE)' == 'nunit'" />
<ProjectReference Include="..\Playwright.Xunit\Playwright.Xunit.csproj" Condition="'$(TEST_MODE)' == 'xunit'" />
<ProjectReference Include="..\Playwright.Xunit.v3\Playwright.Xunit.v3.csproj" Condition="'$(TEST_MODE)' == 'xunit.v3'" />
</ItemGroup>
</Project>
7 changes: 5 additions & 2 deletions src/Playwright.TestingHarnessTest/tests/baseTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ type RunResult = {
}

export const test = base.extend<{
testMode: 'nunit' | 'mstest' | 'xunit' | 'xunit.v3';
runTest: (files: Record<string, string>, command: string, env?: NodeJS.ProcessEnv) => Promise<RunResult>;
}>({
runTest: async ({ }, use, testInfo) => {
testMode: null,
runTest: async ({ testMode }, use, testInfo) => {
const testResults: RunResult[] = [];
await use(async (files, command, env) => {
const testDir = testInfo.outputPath();
Expand All @@ -34,7 +36,8 @@ export const test = base.extend<{
env: {
...process.env,
...env,
NODE_OPTIONS: undefined
NODE_OPTIONS: undefined,
TEST_MODE: testMode,
},
stdio: 'pipe',
});
Expand Down
2 changes: 2 additions & 0 deletions src/Playwright.TestingHarnessTest/tests/mstest/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import http from 'http';
import { test, expect } from '../baseTest';
import httpProxy from 'http-proxy';

test.use({testMode: 'mstest'});

test('should be able to forward DEBUG=pw:api env var', async ({ runTest }) => {
const result = await runTest({
'ExampleTests.cs': `
Expand Down
2 changes: 2 additions & 0 deletions src/Playwright.TestingHarnessTest/tests/nunit/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import http from 'http';
import { test, expect } from '../baseTest';
import httpProxy from 'http-proxy';

test.use({testMode: 'nunit'});

test('should be able to forward DEBUG=pw:api env var', async ({ runTest }) => {
const result = await runTest({
'ExampleTests.cs': `
Expand Down
Loading
Loading