Table of Contents
Everybody that starts to learn coding begins with the question ”which programming language should I learn?” and I know for a fact that it is always hard to know where to start especially when you are on your own and in each breakthrough we achieve in progression with our learning curve towards software development the more we iterate in a loop in starting back to the beginning.
Right now, you are probably wondering, “why should I do automation testing when I know my system works fine? ” or “I’m used to manual testing and it takes time to learn a new thing” and if you are within that thought bubble, it probably means you are still beginning to explore all the concepts on software development or you have given up on what it truly means to be a software developer, but since you have stumbled upon this article, I can assure you that you are on the right track in leveling up your game. If you have not started on exploring with Selenium here is an article you should read: What is Selenium? Getting started with Selenium Automation Testing.
Automation Testing vs Test Automation
Once you have read the prerequisite in understanding the Selenium Suite of tools, you should know that there is a huge difference between Automation Testing and Test Automation and it can be confusing sometimes. In a top-down understanding, both are related to Continuous Delivery and Continuos Testing where the development teams always make sure that in a sprint (Agile vs Waterfall: 13 Must-Know Differences) there are deliverables that are ready to be deployed at any given time. Like features on a system ready for the users to provide feedback to the developers. Continuous Delivery and Testing are part of DevOps and if you want to quickly learn the broad concepts read: Top 20 DevOps Interview Questions
Automation Testing in a way is the automated way of doing regression testing. Imagine doing a smoke test on the Login and Register forms on a website you have just updated, sounds easy right? But when you are dealing with 10 or more websites at the same time which each system that updates a feature consistently, it is hard to think you have time to test the basic components like the Login and Register forms. More of the reasons why you automate the execution. But on a more distinct level of testing like unit testing, you accumulate all those test cases and you would want to always make sure that they work properly as they are intended to do. These predefined tests can be bothersome to execute each time you update your code, that is where Test Automation comes in where you automate the process of managing the different test cases.
Where Do I Start?
Automation Testing can be really overwhelming but if you think about it like a Jigsaw puzzle, you always start with a single piece to get the whole picture going and using the Selenium IDE can be a start, even for non-technical people. Part of it is going on a top-down approach of being able to see results. The impact of Automation Testing can shift your perspective into learning more about it and starting simple is the best way to go in diving into a hard concept to learn.
At the last stage of Continuous Testing, a lot of developers do some functional testing to test if the feature requirements or specifications are met. Functional Testing is a black-box type of testing which the tester does not have to know the internal logic or code. This is where the Selenium IDE is useful. Imagine how a hassle it is to do a functional test every time you have a new update, you always have to make sure that the previous features are working with the current update which is part of the functional regression testing paradigm and with the Selenium IDE you can automate this process.
Getting started with the Selenium IDE is pretty straightforward. The documentation from their site should set you up with an extension or plugin from your browser and you should be able to start recording your functional tests on a website and later on do regression testing on the site. When you get it running you should be able to see something like this:
Opening the Selenium IDE from a Chrome extension
- Click on Record a new test in a new project and enter your project name.
- Provide the base URL (http://thedemosite.co.uk/login.php).
- Once you have started the recording it will redirect you to a new window that looks like this
- We will have our first functional test by testing a login failure and entering a false username and password. In my example, I will be using the username: user1 and password: password. After pressing the Test Login button you will be prompted with a **Failed Login** message.
- Press the Stop Recording button on the Selenium IDE and name your test case as “Login Failed”.
Login Failed Test Case
Once you have saved the test case, you can do an In-browser playback to iterate the steps automatically by clicking on the play button. To save your progress click on the save icon located on the top right corner of the IDE.
Try doing another Test case with a Login Successful use case. Username: Lannister and Password: dragon1$
Doing multiple test cases can be grouped together into suites, this is important when you are working on a medium to large scale projects where organizing your test cases can help you be more efficient.
If you are dealing with a project that needs to be tested on multiple browsers, the platform provides this capability by running it in parallel without having to write a single block of code. But you have to dig deeper on installing the Command-line Runner and from their documentation it requires you to have the following:
- node (the Node.js programming language) version 8 or 10
- npm (the NodeJS package manager) which typically gets installed with node
- selenium-side-runner (the Selenium IDE command line runner)
- and the browser driver we want to use to run the tests locally
Where To Go From Here?
Once you start implementing the Selenium IDE into automating your functional tests, its a step forward in emerging yourself into the whole concept on Automation Testing. Once you have managed to implement it on your own projects, you will notice the difference in efficiency and quality.
A lot of people argue whether automation would replace the intervention of manual testing and although it is not the case, it should never be the reason why you should not pursue it. The next steps would be understanding more on Continuous Testing and concepts like Test Driven Development and if you ever find yourself back in the beginning, it is best to start simple.
Software Tester Might be Interested In: