Skip to content

Commit 03c451a

Browse files
Copilotcsharpfritz
andcommitted
Update README with integration tests documentation and badge
Co-authored-by: csharpfritz <78577+csharpfritz@users.noreply.github.com>
1 parent 46249c1 commit 03c451a

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A collection of Blazor components that emulate the web forms components of the same name
44

5-
[![Build and Test](https://github.com/FritzAndFriends/BlazorWebFormsComponents/actions/workflows/build.yml/badge.svg)](https://github.com/FritzAndFriends/BlazorWebFormsComponents/actions/workflows/build.yml) [![Join the chat at https://gitter.im/BlazorWebFormsComponents/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/BlazorWebFormsComponents/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![docs](https://github.com/FritzAndFriends/BlazorWebFormsComponents/workflows/docs/badge.svg)](https://fritzandfriends.github.io/BlazorWebFormsComponents/)
5+
[![Build and Test](https://github.com/FritzAndFriends/BlazorWebFormsComponents/actions/workflows/build.yml/badge.svg)](https://github.com/FritzAndFriends/BlazorWebFormsComponents/actions/workflows/build.yml) [![Integration Tests](https://github.com/FritzAndFriends/BlazorWebFormsComponents/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/FritzAndFriends/BlazorWebFormsComponents/actions/workflows/integration-tests.yml) [![Join the chat at https://gitter.im/BlazorWebFormsComponents/community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/BlazorWebFormsComponents/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![docs](https://github.com/FritzAndFriends/BlazorWebFormsComponents/workflows/docs/badge.svg)](https://fritzandfriends.github.io/BlazorWebFormsComponents/)
66

77
[![Nuget](https://img.shields.io/nuget/v/Fritz.BlazorWebFormsComponents?color=violet)](https://www.nuget.org/packages/Fritz.BlazorWebFormsComponents/) [![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Fritz.BlazorWebFormsComponents)](https://www.nuget.org/packages/Fritz.BlazorWebFormsComponents/) [![Live Sample](https://img.shields.io/badge/-Live%20Sample-purple)](https://blazorwebformscomponents.azurewebsites.net)
88

@@ -98,3 +98,30 @@ There are three different types of .NET projects in this repository: .NET Frame
9898
`dotnet restore` to restore packages
9999

100100
`dotnet run --project samples/AfterBlazorServerSide` to start the Blazor Server-Side samples
101+
102+
## Testing
103+
104+
The project includes two types of tests:
105+
106+
### Unit Tests
107+
Unit tests for the component library are located in `src/BlazorWebFormsComponents.Test/` and use xUnit with bUnit for component testing.
108+
109+
Run unit tests with:
110+
```bash
111+
dotnet test src/BlazorWebFormsComponents.Test
112+
```
113+
114+
### Integration Tests
115+
Integration tests using Playwright validate the sample application pages. These tests are located in `samples/AfterBlazorServerSide.Tests/`.
116+
117+
To run integration tests locally:
118+
1. Install Playwright browsers (first time only):
119+
```bash
120+
pwsh samples/AfterBlazorServerSide.Tests/bin/Debug/net10.0/playwright.ps1 install
121+
```
122+
2. Run the tests:
123+
```bash
124+
dotnet test samples/AfterBlazorServerSide.Tests
125+
```
126+
127+
See [samples/AfterBlazorServerSide.Tests/README.md](samples/AfterBlazorServerSide.Tests/README.md) for more details.

0 commit comments

Comments
 (0)