Closed SuperDaveOsbourne closed 3 years ago
Steve Sanderson has released a prototype testing library which you can find here. There is also an excellent testing library by Egil Hansen which builds on the features of Steves library but adds much more.
Ultimately, most UI testing frameworks will work with Blazor as they are just looking at outputted HTML (Selenium for example). The libraries above try to offer a bit more and a better way.
How will the screen scraping approach work if I want to test remotely? What are the implications if any?
Are you talking about testing a render of the UI? If so, any way you’ve done this with other frameworks should work wit Blazor
There is a great video from the last .NET Conf "Focus on Blazor" by Egil Hansen about testing Blazor components: https://channel9.msdn.com/Events/dotnetConf/Focus-on-Blazor/Testing-Blazor-Components You probably should watch it.
You can try IcuBlazor: http://icublazor.com/. Like Playwright, you can automate your UI, take snapshots and pixel-diff them. All with lovely blazor code.
Thank you all for the answers, I close this issue.
Is there any plan for how Blazor sites will be tested? I see Playwright https://github.com/microsoft/playwright as the closest thing so far. Not sure how well web assembly will work with sites going forward?