aspnettest.template.blazor 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet new install aspnettest.template.blazor::0.2.1
This package contains a .NET Template Package you can call from the shell/command line.

Solution template for aspnettest Blazor Server App

The template to generate a Blazor Server App already wired up with bUnit and aspnettest Selenium (NuGet packages aspnettest.asplib.blazor and aspnettest.iselenium.blazor) can be instantiated with:

dotnet new install aspnettest.template.blazor
dotnet new aspnettest-blazor -o MyBlazorApp

If you haven’t already, enable the „Microsoft WebDriver“ in „Apps and Features“ in the Windows Settings. Then open the generated MyBlazorApp.sln with Visual Studio. Due to the circular dependency (by design) between the app and its Selenium tests, it is mandatory to build the solution twice, the second time enforced as „Rebuild Solution“. From the Test-Explorer window, open the generated MyBlazorApp.playlist. It contains two test projects: MyBlazorAppBunitTest (which runs fast) and MyBlazorAppSeleniumTestRunner which starts the web server, an Edge browser instance and runs the tests in MyBlazorAppSeleniumTest (excluded from the playlist) by pushing the test button in the browser.

Running the BlazorApp1.playlist:

BlazorApp1.playlist running

Unlike Edge, FireFox doesn't block mouse click events when run by the Selenium WebDriver. The additional counter increment causes the test to fail:

Interruption with FireFox

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.2 905 2/23/2023
0.2.1 333 1/30/2023
0.2.0 342 12/30/2022

* Blazor: Fix issue #5 race condition in the `PersistentMainFactory` due to the
 static ad hoc cache by setting up a request correlation guid in `_Host.cshtml`

* Blazor: Deprecate the `Component` accessor in favor of the apparently
 canonical `Cut` for "component under test"

* Blazor: Synchronization in `Navigate()` and `Refresh()` now with the same
 arguments as `Click()` with int `expectRenders` instead of bool `expectRender`
 (breaking change)

* Blazor: Support the `?clear=true` GET argument to clear the storage

* WebForms and Core examples: Internet Explorer has been forcibly disabled by
 Microsoft, thus remove it from old tests

* Set Selenium `RequestTimeout` to 1 sec if not configured

* Add Source Link to the NuGet packages