Selenium automation framework is used widely across the world to test web based applications. After the invention of test automation tools and frameworks, the software testing has become easier and perfect also. Testing automation helped to reduce the cost and at the same time, it reduced the time consumption for testing.
Introduction to Testing Automation
Testing is an integral part of software development and each software application should be tested for its overall performance.In some cases, intermediate products also need to be checked. Besides, whenever a new version is being introduced, it should be thoroughly checked before releasing the same.
In most of the cases, same tests will have to be repeated a number of times and here you can save a lot of time by automating the tests.
Advantages of automated testing
- Time required for testing can be reduced considerably
- The manpower required for testing can be reduced considerably.
- It ensures complete control over the results.
- Chances of human errors are minimized.
Tools Included in Selenium Automation Testing Framework
Selenium is the most widely used testing automation tool in the world for testing web based applications. It has many components and in the latest version, selenium webdriver has replaced selenium RC. Selenium is compatible with multiple browsers and platforms and it also supports different programming languages such as java, C#, Python, Ruby, and PHP.
Eclipse IDE is the widely used integrated development environment for java and it is a product of Eclipse open source project.
It is a testing framework with extended capabilities and added features which make it more powerful than its counterparts. It supports ReportiNG and XSLT plug-ins and provides the ability to implement IReporter. IReporter is used to generate customized TestNG reports.
AutoIT v3 is a freeware scripting language specially designed for automating Windows GUI scripting. Simulated keystrokes, mouse movements and Window/ control manipulations are used to automate which is otherwise not possible with Selenium.
File Formats used in Selenium Automation Frameworks
Basically, three types of files are used in Selenium Automation Frameworks.
- Property files for storing UI elements of an application or a website and data set file paths.
- Excel Files for passing multiple sets of data to the application.
- XML file for executing test scripts.
Project Folder Structure
Folders are created with subfolders and classes and the details are as given below
UI Map/ Object Repository
UI Map or Object Repository is a concept to define, store and serve UI elements of the web or an application.
Data Set/ Test Data
Dataset is for storing data files and the scripts will read test data from external sources and execute the test based on that data.
Test Automation Scripts
This will have multiple test files, packages and class files that will be executed based on the configurations provided in testing.xml
Reports / Executed Results
This is a document that contains the summary of test activities.
TestNG XML file
This can be considered a driver that drives several test cases automated by using Selenium.