Learn how to efficiently automate and test web applications in C# using PuppeteerSharp and SpecFlow for streamlined end-to-end testing.
This article may be longer than expected, but I hope you enjoy it.
We often need to automate tasks or test applications as developers or testers. In such cases, there is usually limited time for manual testing, making .
I’ll have a small discussion regarding of SpecFlow in Visual Studio. You can either install it from VS 2022 or manually. It is totally upto you. I assume you have installed this extension.
We create a NUnit project for this.
Now create some folders to manage our code.
Utilities (Helpers will be placed in the Utilities folder)
Features (All Feature files will be stored in the Features folder)
Steps (Step definitions will be organized in the Steps folder)
When we click on this section. we will see related items of SpecFlow. We need Feature File for SpecFlow. Select it and named it and click on Add button
To run this test, right-click on the test SearchForPuppeteerSharpOnGoogle and select 'Run'. You will see the test running. The first time, it may take a bit longer because the compiler needs to download the Chromium browser. Once the browser is downloaded, the tests will begin to run.
If the test has been successfully run, we will see a green icon indicating that the test passed successfully.
You can find the source code from here.
This is done for now. Hopefully, you enjoyed it. Have a nice day. We will see next time and in a different blog.
SOCIAL SHARE CARD GENERATOR