I am developing an automated test suite for regression testing using Extent Reports, Selenium WebDriver and C#. The tests are confined to a single Visual Studio console app. What I have right now doesn't seem optimal in terms of scalability. I don't have a lot of experience with automated testing or QA in general, how can I keep this framework scalable? Here is the current structure:
- TestExtent.cs - This class contains all of the setup and breakdown methods for extent reports and creates the drivers. It has one method for each web page I'm testing. Each of the these test methods call test classes and helper classes (Helpers are shared between multiple pages with common components. i.e - testing global headers, footers, and link validation functions). The test methods also contain
driver.Navigate().GoToUrl(url)
, and create anew ExtentTest
object (extent.CreateTest("test name")
which creates a new test in the report. - Program.cs - This hosts the main method and decides which tests I'm running. It creates a TestExtent object that calls all of the tests I wish to run. If I don't need to run a test, I can comment the call to that test method out.
- Test classes - Test classes contain unique tests for unique components on web pages, which will eventually be called by the test methods in the TestExtent class. The WebDriver and the ExtentTest objects created in the TestExtent methods are passed to the test class constructors.
- Helper classes - A static class that contains common tests that are found on multiple pages. Like the test classes, the helper methods are called in the TestExtent class. The helper classes usually take the WebDriver and the ExtentTest object created by the test methods in TestExtent. The WebDriver and the ExtentTest object from the test methods in the TestExtent class are passed to the helper methods.
To create a new test with how the program is organized right now, I would need to create new test classes, create a new test method in TestExtent.cs to call the test classes and helper methods, then run the test in program.cs. Before I build this out more, I want to make sure it is as scalable as possible. I feel like the most important things to consider are:
- how am I going to add new tests
- how am I going to change/delete old tests
- (which is less important at the moment) How will I handle running tests. Ideally, if someone is unfamiliar with visual studio or code, they shouldn't have to dig into the code to comment out tests you need to exclude.
It would be great to hear from people who have experience with automated testing, regression testing, Extent Reports, or c# and selenium webdriver. I am most concerned with the scalability of the framework and would love to here what experienced QA have to say! Thanks in advance for any advice.