1. What is SelDotNet?SelDotNet is an automated testing framework that uses Selenium WebDriver Client and NUnit. It is a helpful solution to apply automated testing with Selenium and NUnit.
2. Features1) A Readable Project Folder StructureThis is a recommended folder structure for a test project that uses Sel Dot Net framework. 2) Page Oriented DesignThe test is separated in modules, pages and actions. In order to design tests, we just identify the pages and their actions. Then, in the testing classes, we call these actions. Therefore, the tests are readable and clear. With this designing approach, we know that how many pages are automated; How many features are automated.
Figure 1Page Oriented Design 3) Separated GUI MapGUI Map is a repository that stores test objects’ information that reflects real object. GUI Map is stored in a separated section. So that, if there is any change on GUI, we don’t need to change the source code and build again. 4) Separated Test DataIt does not affect to the source code either if we want to change the set of testing data. Since, SelDotNet also stores test data in a separated section. 5) Test Multi-language supported web applicationIn order to test web application that supports multi-languages, we just create more GUI mapping sets, test data sets adapted for each language. 6) Self-Described scriptsThe tests automatically describe themselves by using SelDotNet framework. E.g. looking in to this block of code, you also understand the testing workflow. class LoginPage { public void SubmitLoginForm(string username, string password) { Editbox("Username Textbox").Set(username); Editbox("Password Textbox").Set(password); Button("LoginButton").Click(); }
public void AssertShowWelcomeText() { Label("Welcome Text").AssertPresent(); } }
class TestLoginFeature { public void TestLogin(string username, string password) { LoginPage loginPage = new LoginPage(); loginPage.SubmitLoginForm(username, password); loginPage.AssertShowWelcomeText(); } }
7) Self-Logged testing scriptsIf there is any error, SelDotNet will capture screen shot for later reference. It also logs reproducing steps to the report to let user know about the problem.
Figure 2 Self Logged/Reported Test Scripts 8) Catch Javascript Error AutomaticallyDuring executing time, SelDotNet will logs javascript error to the result if any. 9) SecuritySelDotNet provides an encryption tool to encrypt sensitive information such as password, connection string to DB. Then we use them as inputs.
Editbox("Password Textbox").SetSecure("99wjJUMMyPZaAnAisq9SCA==");
10)Inherits features of NUnit frameworkUsing NUnit framework to perform asserting tasks Using NUnit Runner to select and run test fixture/ test cases. 11)Supports well for common web objectSupporing for common web objects:
10. Listbox 11. RadioGroup 12. Table 13. TextArea E.g.
12)Save time on scriptingThis is a traditional way to verify text of a cell in a table public string GetTextFromCell(stirng locator, int rowIndex, int colIndex) { //Do some thing here return cellText; } string celltext = GetTextFromCell(locator, rowIndex, colIndex); string expectedText ="123"; string msg = String.Format("Asserts that text of cell ({0},{1}) of {2} is {3}",rowIndex,colIndex,locator,exp); Assert.AreEqual(expectedText,celltext,msg);
Now the script will be simplier and more readable Table("Result").AssertCellText(0, 0, "123"); |