What is the best way to test my webforms applications?
Looks like people are loving Watin, and selenium.
ASP.NET Web Forms is no longer an option for new development. It's shunned but not dead — supported as a legacy product, but finally exiled from the future of . NET.
ASP.Net can add Unit Testing for applications. To test an application, you need to add a Unit Test project to the ASP.Net solution. All tests can be made to run in Visual Studio. A test explorer will show the results of all of the tests.
On the Visual Studio Start window, choose Create a new project. On the Create a new project page, enter unit test in the Search box. The template list filters to unit testing projects. Select the Unit Test App (Universal Windows) template for either C# or Visual Basic, and then select Next.
Just wondering, why would you call WatiN a unit testing tool? Last time I checked, it ran integration tests.
The best way would be to move all code that doesn't depend on HttpContext to a separate assembly and run unit tests as usual. The rest can be tested with Ivonna. She doesn't test the client behavior, that's where WatiN can be helpful; however, if you want to test your pages or controls in isolation, she's your only choice.
UPDATE: Given WatiN has been stagnant for over a year now, I would direct anyone that needs web ui tests towards selenium, it is in continuous use & development by many contributors, and is actively used by Google.
WatiN is the best that I've found. It integrates into Visual Studio unit testing or nunit & you can do pretty much anything you need in the browser (click links, submit forms, look for text/images, etc.)
See the following questions for similar answers:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With