Skip to content

Commit f03c583

Browse files
Merge pull request #290712 from vvs11/vvs11/nunit-updates
updated view test run section for NUnit
2 parents d252b35 + ee30bf7 commit f03c583

9 files changed

+80
-8
lines changed

articles/playwright-testing/how-to-use-service-config-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Here's version of the `.runsettings` file with all the available options:
212212
213213
```
214214

215-
## Options in `.runsettings` file
215+
## Config options in `.runsettings` file
216216

217217
* **`serviceAuthType`**:
218218
- **Description**: This setting allows you to choose the authentication method you want to use for your test run.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "Include file"
3+
description: "Include file"
4+
ms.custom: "include file"
5+
ms.topic: "include"
6+
ms.date: 11/19/2024
7+
---
8+
9+
10+
1. After your test run completes, you get a link to the Playwright portal in your terminal. Open this link to view detailed test results and associated artifacts. The portal displays essential information, including:
11+
- CI build details
12+
- Overall test run status
13+
- The commit ID linked to the test run
14+
15+
:::image type="content" source="../media/include-playwright-portal-view-test-results-nunit/playwright-testing-open-test-run.png" alt-text="Screenshot that shows list of tests in the test run." lightbox="../media/include-playwright-portal-view-test-results/playwright-testing-open-test-run.png":::
16+
17+
3. The Playwright portal provides all the necessary information for troubleshooting. You can:
18+
- View detailed error logs, and attached artifacts such as screenshots or videos.
19+
- Navigate directly to the **Trace Viewer** for deeper analysis.
20+
21+
:::image type="content" source="../media/include-playwright-portal-view-test-results-nunit/playwright-testing-open-test.png" alt-text="Screenshot that shows the preview of a test." lightbox="../media/include-playwright-portal-view-test-results/playwright-testing-open-test.png":::
22+
23+
> [!NOTE]
24+
> Some metadata, such as the owner, description, and category, is currently not displayed on the service dashboard. If there’s additional information you’d like to see included, please submit a [GitHub issue in our repository](https://aka.ms/mpt/feedback).
25+
26+
4. The Trace Viewer allows you to step through your test execution visually. You can:
27+
- Use the timeline to hover over individual steps, revealing the page state before and after each action.
28+
- Inspect detailed logs, DOM snapshots, network activity, errors, and console output for each step.
29+
30+
:::image type="content" source="../media/include-playwright-portal-view-test-results-nunit/playwright-testing-trace-viewer.png" alt-text="Screenshot that shows the trace viewer." lightbox="../media/include-playwright-portal-view-test-results/playwright-testing-trace-viewer.png":::
31+
Loading
Loading
Loading

articles/playwright-testing/quickstart-automate-end-to-end-testing.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,15 @@ In the `playwright.config.ts` file of your project, make sure you are collecting
112112

113113
3. Save and commit the file to your source code repository.
114114

115-
## Update .csproj file for your project
115+
## Install service package
116116

117-
Update the `csproj` file in your repository to add details about Microsoft Playwright Testing service package in `ItemGroup` section.
117+
In your project, install Microsoft Playwright Testing package.
118+
119+
```PowerShell
120+
dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.NUnit --prerelease
121+
```
122+
123+
This updates your project's `csproj` file by adding the service package details to the `ItemGroup` section. Remember to commit these changes.
118124

119125
```xml
120126
<ItemGroup>
@@ -365,6 +371,9 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
365371

366372
When the CI workflow is triggered, your Playwright tests run in your Microsoft Playwright Testing workspace on cloud-hosted browsers, across 20 parallel workers. The results and artifacts collected are published to the service and can be viewed on service portal.
367373

374+
375+
The settings for your test run can be defined in `.runsettings` file. For more information, see [how to use service package options](./how-to-use-service-config-file.md#config-options-in-runsettings-file)
376+
368377
> [!NOTE]
369378
> Reporting feature is enabled by default for existing workspaces. This is being rolled out in stages and will take a few days. To avoid failures, confirm that `Rich diagnostics using reporting` setting is ON for your workspace before proceeding. For more information, see, [Enable reporting for workspace](./how-to-use-service-features.md#manage-feature-for-the-workspace).
370379

@@ -384,8 +393,18 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
384393

385394
You can now troubleshoot the CI pipeline in the Playwright portal,
386395

396+
::: zone pivot="playwright-test-runner"
397+
387398
[!INCLUDE [View test runs and results in the Playwright portal](./includes/include-playwright-portal-view-test-results.md)]
388399

400+
::: zone-end
401+
402+
::: zone pivot="nunit-test-runner"
403+
404+
[!INCLUDE [View test runs and results in the Playwright portal](./includes/include-playwright-portal-view-test-results-nunit.md)]
405+
406+
::: zone-end
407+
389408

390409
> [!TIP]
391410
> You can use Microsoft Playwright Testing service features independently. You can publish test results to the portal without using the cloud-hosted browsers feature and you can also use only cloud-hosted browsers to expedite your test suite without publishing test results. For details, see [How to use service features](./how-to-use-service-features.md).

articles/playwright-testing/quickstart-generate-rich-reports-for-tests.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ Microsoft Playwright Testing service enables you to:
2424
- Accelerate build pipelines by running tests in parallel using cloud-hosted browsers.
2525
- Simplify troubleshooting by publishing test results and artifacts to the service, making them accessible through the service portal.
2626

27-
These two features of the service can be used independently of each other and each has its own [pricing plan](https://aka.ms/mpt/pricing). This means you can:
27+
These two features of the service can be used independently or together, and each has its own [pricing plan](https://aka.ms/mpt/pricing). You have the flexibility to:
2828

29-
- Expedite test runs and streamline troubleshooting by running tests in cloud-hosted browsers and publishing results to the service.
29+
- Expedite test runs and streamline troubleshooting by using both features: running tests in cloud-hosted browsers and publishing results to the service.
3030
- Run tests only in cloud-hosted browsers to finish test runs faster.
3131
- Publish test results to the service while continuing to run tests locally for efficient troubleshooting.
3232

33+
> [!NOTE]
34+
> This article focuses on how you can publish test results to the service without using cloud-hosted browsers. If you want to learn how to also accelerate your test runs, see [quickstart: run Playwright tests at scale](./quickstart-run-end-to-end-tests.md)
35+
3336
## Prerequisites
3437

3538
* An Azure account with an active subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
@@ -261,7 +264,7 @@ You've now prepared the configuration for publishing test results and artifacts
261264
dotnet test --settings:.runsettings
262265
```
263266
264-
The settings for your test run are defined in `.runsettings` file. For more information, see [how to use service package options](./how-to-use-service-config-file.md#options-in-runsettings-file)
267+
The settings for your test run are defined in `.runsettings` file. For more information, see [how to use service package options](./how-to-use-service-config-file.md#config-options-in-runsettings-file)
265268
266269
> [!NOTE]
267270
> For the Reporting feature of Microsoft Playwright Testing, you get charged based on the number test results published. If you're a first-time user or [getting started with a free trial](./how-to-try-playwright-testing-free.md), you might start with publishing single test result instead of your full test suite to avoid exhausting your free trial limits.
@@ -290,8 +293,17 @@ Workload updates are available. Run `dotnet workload list` for more information.
290293

291294
You can now troubleshoot the failed test cases in the Playwright portal.
292295

296+
::: zone pivot="playwright-test-runner"
297+
293298
[!INCLUDE [View test runs and results in the Playwright portal](./includes/include-playwright-portal-view-test-results.md)]
294299

300+
::: zone-end
301+
302+
::: zone pivot="nunit-test-runner"
303+
304+
[!INCLUDE [View test runs and results in the Playwright portal](./includes/include-playwright-portal-view-test-results-nunit.md)]
305+
306+
::: zone-end
295307

296308
> [!TIP]
297309
> You can also use Microsoft Playwright Testing service to run tests in parallel using cloud-hosted browsers. Both Reporting and cloud-hosted browsers are independent features and are billed separately. You can use either of these or both. For details, see [How to use service features](./how-to-use-service-features.md)

articles/playwright-testing/quickstart-run-end-to-end-tests.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Run Playwright tests against browsers managed by the service and see the results
313313
dotnet test --settings:.runsettings --logger "microsoft-playwright-testing" -- NUnit.NumberOfTestWorkers=20
314314
```
315315
316-
The settings for your test run are defined in `.runsettings` file. See [how to use service package options](./how-to-use-service-config-file.md#options-in-runsettings-file)
316+
The settings for your test run are defined in `.runsettings` file. See [how to use service package options](./how-to-use-service-config-file.md#config-options-in-runsettings-file)
317317
318318
After the test run completes, you can view the test status in the terminal.
319319
@@ -337,8 +337,18 @@ Workload updates are available. Run `dotnet workload list` for more information.
337337
338338
You can now troubleshoot the failed test cases in the Playwright portal.
339339
340+
::: zone pivot="playwright-test-runner"
341+
340342
[!INCLUDE [View test runs and results in the Playwright portal](./includes/include-playwright-portal-view-test-results.md)]
341343
344+
::: zone-end
345+
346+
::: zone pivot="nunit-test-runner"
347+
348+
[!INCLUDE [View test runs and results in the Playwright portal](./includes/include-playwright-portal-view-test-results-nunit.md)]
349+
350+
::: zone-end
351+
342352
343353
> [!TIP]
344354
> You can use Microsoft Playwright Testing service features independently. You can publish test results to the portal without using the cloud-hosted browsers feature and you can also use only cloud-hosted browsers to expedite your test suite without publishing test results.

articles/playwright-testing/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ items:
1919
- name: Set up continuous end-to-end testing
2020
displayName: getting started, quickstart, github actions, azure pipelines, azure devops, ci/cd, CICD, continuous integration, continuous delivery
2121
href: quickstart-automate-end-to-end-testing.md
22-
- name: Troubleshoot using rich reports and atrifacts
22+
- name: Troubleshoot using rich reports and artifacts
2323
displayName: getting started, quickstart, reporting, cli, playwright, command-line
2424
href: quickstart-generate-rich-reports-for-tests.md
2525
- name: Concepts

0 commit comments

Comments
 (0)