Skip to content

Commit 3873c15

Browse files
feat(playwrighttesting): separate api, test data processing and utility layers (Azure#46681)
* feat(playwrighttesting): separate api, data processing and utility layers * chore(): additional scalable run failure handling * chore(): api retries and logging * chore(): reporting api failure error handling * fix(): no access token error message logged with error level * chore(): remove null check condition in console writer * chore(): add different logging levels * refactor(): rename logger to microsoft-playwright-testing * Update TestProcessor.cs * Update ReporterUtils.cs * Create ReporterUtilsTests.cs * fix(): uri escape data string for workspace and run id * fix(): ad hoc fixes * fix(): handle null sas uri post refresh * chore(): change reporting api version 2024-09-01-preview * chore(): add tests for reporter * chore(): add new api info * fix(): remove parallelization from entra tests --------- Co-authored-by: Siddharth Singha Roy <[email protected]> Co-authored-by: Kashish Gupta <[email protected]>
1 parent d5acd65 commit 3873c15

36 files changed

+3184
-1114
lines changed

sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Ensure that the `PLAYWRIGHT_SERVICE_URL` that you obtained in previous step is a
8181
Run Playwright tests against browsers managed by the service using the configuration you created above.
8282

8383
```dotnetcli
84-
dotnet test --logger "ms-playwright-service"
84+
dotnet test --logger "microsoft-playwright-testing"
8585
```
8686

8787
## Key concepts

sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample1_CustomisingServiceParameters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This guide explains the different options available to you in the Azure.Develope
1616
<Parameter name="Os" value="linux" />
1717
<Parameter name="RunId" value="sample-run-id" />
1818
<Parameter name="ExposeNetwork" value="<loopback>" />
19-
<Parameter name="ServiceAuth" value="EntraId" />
19+
<Parameter name="ServiceAuthType" value="EntraId" />
2020
<Parameter name="UseCloudHostedBrowsers" value="true" />
2121
<Parameter name="AzureTokenCredentialType" value="DefaultAzureCredential" />
2222
<Parameter name="ManagedIdentityClientId" value="77bfc267-86cb-4eeb-9e4a-747a217a318c" />
@@ -79,7 +79,7 @@ public class PlaywrightServiceSetup : PlaywrightServiceNUnit
7979
3. **`ExposeNetwork`**:
8080
- **Description**: This settings exposes network available on the connecting client to the browser being connected to.
8181

82-
4. **`ServiceAuth`**
82+
4. **`ServiceAuthType`**
8383
- **Description**: This setting allows you to specify the default authentication mechanism to be used for sending requests to the service.
8484
- **Available Options**:
8585
- `ServiceAuthType.EntraId` for Microsoft Entra ID authentication.

sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/samples/Sample2_SetDefaultAuthenticationMechanism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class PlaywrightServiceSetup : PlaywrightServiceNUnit {};
2424
<RunSettings>
2525
<TestRunParameters>
2626
<!-- Set the service auth type as AccessToken -->
27-
<Parameter name="ServiceAuth" value="AccessToken" />
27+
<Parameter name="ServiceAuthType" value="AccessToken" />
2828
</TestRunParameters>
2929
</RunSettings>
3030
```

sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/api/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.netstandard2.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client
5555
{
5656
public partial class TestReportingClientOptions : Azure.Core.ClientOptions
5757
{
58-
public TestReportingClientOptions(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion version = Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion.V2024_05_20_Preview) { }
58+
public TestReportingClientOptions(Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion version = Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Client.TestReportingClientOptions.ServiceVersion.V2024_09_01_Preview) { }
5959
public enum ServiceVersion
6060
{
61-
V2024_05_20_Preview = 1,
61+
V2024_09_01_Preview = 1,
6262
}
6363
}
6464
}

sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/src/Client/ReportingTestResultsClient.cs

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)