Automating GUI Functional Testing with Selenium
What is GUI Functional Testing?
Functional Testing means testing that an application is working as it is supposed to. GUI Functional Testing is when you test the function of the user interface, making sure the front end of the application is reacting as it is supposed, including elements on the screen working as specified, and also color, font, element size, that should match design requirements.
There are many test automation tools that have been designed for GUI Functional Testing, Selenium is the most popular one today.
What is Selenium?
Selenium is a suite of tools that includes: Selenium IDE, Selenium WebDriver, Selenium Grid and Selenium Standalone Server. Selenium is a tool for automating browsers, which means that Selenium makes browsers execute commands according to your scenario. This is why it’s the perfect tool for web application testing, but you are not limited to just that.
Selenium WebDriver is a free, open-source, portable software-testing framework for testing web applications. It provides a common application programming interface (API) for browser automation.
Selenium WebDriver is a library that you call from your code, which executes your commands on the browser of your choice. You can read about how to get started with running Selenium webdriver tests here and here.
What are the benefits of using Selenium for GUI Functional testing?
Selenium has many benefits for developers looking to run front end tests to make sure that their application is functioning correctly.
Firstly Selenium is an open source testing solution, which means that it is free, and is supported by the open source community who constantly provide updates, bug fixes and resources.
It can be run on Windows, Linux and macOS platforms, which is a big plus for developers who want to use different platforms.
GUI Functional and Performance Testing- Better Together
While GUI Functional testing is crucial to make sure that your site is working as expected, it still won’t be able to show you how your site functions under load. You would need to run GUI Functional Tests together with Performance Tests to get a full picture of how your site UX is performing under load.
With the BlazeMeter Chrome extension you can record all of the HTTP/S requests and Selenium commands that your browser sends at the same.It creates a JMeter and Selenium script, and uploads it to Blazemeter, where you can execute it with a single click.
In other words, this means you can run a JMeter and Selenium test, without having JMeter or setting up an environment to code and execute Selenium scripts. There is no need to install JMeter or Selenium to get started recording or run a performance test; the Chrome extension creates the script on its own. Check out this webinar to learn more.
Running Your JMeter and Selenium Script Locally
Alternatively, if you have an existing Selenium setup or JMeter installed, you can convert your recording into a JMeter JMX file or Taurus YAML file, then edit these scripts to your needs and run a Selenium script using your local browser or do a test run of your JMeter script from your local computer.