aspnettest.template.blazor
0.2.2
dotnet new install aspnettest.template.blazor::0.2.2
Solution Template for aspnettest Blazor Server App
The template to generate a Blazor Server App already wired up with bUnit, SpecFlow 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
:
Unlike Edge, FireFox doesn't block mouse click events when run by the Selenium WebDriver. The additional counter increment causes the test to fail:
-
.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.
* Blazor: Add URL QueryString persistence, use it with:
`"SessionStorage": "UrlQuery"`
* Blazor: Allow multiple test assemblies in the `<testbutton>`
* Add SpecFlow test suite, which allows writing GUI tests
in the Gherkin language.
* Add optional ViewState gzip compression, enable it with:
`"ViewStateCompressionLevel": "Optimal"`
which sets a `System.IO.Compression.CompressionLevel`