Recently, I had a debate with some of my colleagues about whether selenium is or is not a testing framework. In this article, we’ll dive into this topic and I will share my perspective on this subject.
What is Selenium?
When we think about test automation, one of the most prominent names in the field is Selenium. Selenium has been released in 2004, and it is an open-source suite of tools and libraries that is used for test automation.
It provides a single interface that lets you write test scripts in programming languages like Ruby, Java, NodeJS, PHP, Perl, Python, JavaScript, and C#, among others. Selenium is very extensible and can be integrated with other tools like TestNG, JUnit, Cucumber, so on and so forth.
Understanding Selenium's role
Selenium is often associated with automated testing, but it’s important to distinguish between a testing framework and a testing tool.
- a testing framework provides a structured environment for designing, organizing, and executing test cases that includes assertion, reporters, logging libraries, and many more
- a testing tool is a software application that assists in performing specific testing activities
Selenium Components
Selenium is a suite of tools that work together to facilitate automated testing, as it follows:
- Selenium WebDriver: This component forms the core of Selenium. It provides a programming interface to interact with web browsers and simulate user actions. WebDriver allows you to write scripts in various programming languages to automate browser interactions.
- Selenium IDE (Integrated Development Environment) is a browser extension, currently supported by Firefox and Chrome. It is one of the simplest frameworks in the Selenium Suite. It provides a record & play feature while we manually perform the tests.
- Selenium Grid: Selenium Grid is used for distributed testing, allowing you to run tests across multiple browsers, operating systems, and machines simultaneously
Conclusion
I personally classify Selenium standalone in the tools category. A testing framework is a combination of tools (that may include Selenium as well), that can be integrated with other programming-specific libraries (e.g. Java – JUnit, Cucumber, Log4j, JavaScript – Chai, fakerjs, dotenv, mochawesome, and so on), helping QA professionals test more efficiently.
Note* I said – may include Selenium – because in the last few years, new testing frameworks joined the test automation world and gained significant popularity, that no longer use Selenium at all. (e.g. Cypress , TestCafe, Playwright, and so on).
Later edit: Selenium’s stance is that it’s a tool, not a framework. More details in this video conference
Enjoyed this article? Make sure to subscribe to my YouTube Channel for more Test Automation tutorials, and follow me on LinkedIn and Twitter for regular insights.
Looking to accelerate your test automation journey?
I’ve designed a personalized 1-on-1 mentoring program tailored to boost your skills. Reach out at iamqarv@gmail.com for more details 🚀
