My objective is to start Playwright in memory and run some end to end tests against a in-memory test server.
I've forked Jonathan's great repo which demonstrates exactly what I want to do, however it's using .Net core 3.1 and a MVC project which uses Program.cs & Start.cs.
I have forked and upgraded the project files to .net 6, I have also added a razor project which uses the new top-level statements in program.cs
https://github.com/carlblanchard/InMemoryPlaywrightDemo (Repo has the failure .net 6.0)
https://github.com/JD-Innovensa/InMemoryPlaywrightDemo (Report that works in .net 3.1)
When running the test When_ClickEmployeeMenuOption_Then_EmployeesPageDisplayed_Chrome the following errors occurs.
System.InvalidOperationException: 'A public method named 'ConfigureAutomatedTesting' or 'Configure' could not be found in the 'Program' type.'
I can't see any decent documentation on how to run a test server against a project with a minimal program.cs file.
If anyone knows how to do this please help, it's been really annoying me.
Thanks in advance.