Selenium: Open source automated web browser testing at its best!
Browser testing has to be a key part of any project process. Everything from IE8 to iPads are now widely used in corporate environments, and, users are beginning to expect multi-device options, meaning that all software is subject to increasingly rigorous browser testing.
Automated testing for web-based applications is a cost-saving tool way which allows us to focus manual testing where it adds the most value. Recently, organisations have started to rely on open source test automation tools (which have now become so advanced they rival the commercial ones) instead of investing in their costly commercial counterparts. With no licensing costs, these open source testing tools provide competitive features for automating the testing of software applications as well as web platforms.
A variety of open source automation testing tools are available for almost all types of testing: functional, web, UAT, regression, performance etc. Now that these solutions have developed, it’s time to make them a staple in any QA automation kit. There are also various open source tools available to support the different testing types: white box testing (unit testing, for example using JUnit) and black box testing (system/regression testing, for example: Selenium, Sahi, Watir, TestMaker, LogiTest, TestGen4J, FitNesse etc).
- White box testing is the detailed investigation of internal logic and structure of the code. In order to perform white box testing on an application, the tester needs to have knowledge of the internal workings of the code. The tester needs to have a look inside the source code and find out which unit of the code is behaving inappropriately.
- Black box testing doesn’t require detailed investigation of internal logic and structure of the code. The tester is unaware of the system architecture and does not have access to the source code. Typically, when performing a black box test, a tester will interact with the system’s user interface by providing inputs and examining outputs without knowing how and where the inputs are worked upon.
So what about Selenium?
Selenium is an open-source automated software testing tool for testing web applications. It ‘s capable of working across different browsers and operating systems. It’s a set of tools that help testers to automate web-based applications more efficiently. You can work on many operating systems using Selenium and you can code in any one of the following languages when using it.
Languages supported by Selenium
Browsers supported by Selenium
- Mozilla (till latest version)
- IE 6-11
- Google Chrome
- Opera 8,9,10
The language you use does not affect the language in which your application is made. For example, if your application is made in C#, then you can use Selenium with any languages mentioned above to test it. You need to know at least one of the programming languages mentioned above in order to learn Selenium. Operating systems Supported by it include Windows, Mac, Linux, Unix and many more.
Components of Selenium
- Selenium IDE: Installs as an add-on in Mozilla only. It’s got a strong feature of record and run. You can also extend IDE functionality with the help of user extensions. It supports regular extensions, loops, ‘if’ statements and many other features. You can also parameterise your test cases using IDE.
- Selenium RC: This is the older version of Selenium. It works on multiple browsers. RC can be implemented in any one of the programming languages mentioned above.
- Webdriver: Webdriver is the new version of Selenium. It also works on multiple browsers. It’s removed many drawbacks and issues in Selenium RC and also supports Android and iPhone Testing.
- Grid: Grid is used to run test cases alongside one another on multiple machines and browsers.
Selenium IDE – Recording and updating a script
Selenium IDE is the Firefox Add-on provided by the Selenium group. This is very simple and easy to use add-on so that non-programmers can record and create the test scripts for automating web components. These automated test scripts are used as Selenium RC test cases by choosing the language code. For example, Selenium IDE makes it easier to create Selenium RC test cases.
Selenium IDE is used for:
- Recording and updating the test cases or write them manually in table tab.
- Creating Test Suite by grouping the test cases under one group
- Exporting Test Cases/Suites the supported language and save for Selenium RC to enhance them
- Finding reference of every API and Selense commands
- Debugging test cases by toggling breakpoints through the commands
I’d recommend this tool to anyone who’s looking to test software before taking the leap into a client’s operating system. It’s easy to use, accurate and extremely cost efficient (particularly when compare to its commercial rivals).
Would you like to find out more about how to browser test and quality assure your learning? Get in touch with Saffron to discuss your next project.
You can also find out more about our approach to the QA process here.