Katalon Recorder is an extension for Google Chrome and Firefox browsers that allows you to record test scripts as code in a specific language with the application of specific frameworks.
This tool is convenient when you need to quickly make an automated test. Also, tests recorded with Katalon clearly show which methods are responsible for a specific step, which is very useful not only for beginner QA Automation engineers.
Even for experienced testers, this tool will come in handy as creating templates for autotests. In this tutorial, we will show you how to install this tool and to write a simple test.
In this article, we will demonstrate the installation of Katalon recorder for the Google Chrome browser.
Go to Chrome web store, find Katalon Recorder extension and click "Add to Chrome" button
After that, after a while, the Katalon icon will appear in the browser.
If you click on it, the Katalon Recorder window of the extension will be displayed.
Overview of the features
In the upper part of the window there are buttons with the main functions of the plugin.
"New" – Creating a new test case
"Rec." – Recording a test case
"Play" – Reproduction of the recorded test case
"Play Suite" – Reproduction of a test suite
"Play All" – Reproduction of all cases
"Pause" – Make pause while reproducing
"Report" – Reporting problems to the developers of this plugin
"Export" – Export of created test cases in different programming languages, using different frameworks
This plugin supports the following export options:
On the left side, there is a block with created test cases / test suites.
Katalon has two main building blocks: Test Case and Test Suite. Test Case is a set of step-by-step commands with certain checks, Test Suite is a collection of several Test Cases. It is a kind of grouping for test cases.
In the central part there is a block with commands for a specific test case.
You may find the block with various tabs at the bottom:
Log, Screenshots,Variables,Data Driven, Extension Scripts, Reference and Self-healing
Test script creation
Let's create a simple test that will search for the IssArt blog site on google, follow the link, then go to the QA/Testing section and verify that we are on this page.
Click the "New" button and fill the name for the new test case. Then click "Ok"
Click "Record" button and start to carry out the steps described above for testing (Search blog page issart, etc.) then click "Stop"
After these manipulations , we'll have a step-by-step script in the "Commands" block.
Now we need to check that we are in the Qa / Testing section of the IssArt website. After looking at the page, how can we know that we are in the right section? The page title gives us information about this.
So let's use this element as the confirmation that we are on the QA / Testing page of the IssArt website.
In order to add a check, press "+"
In the "command" we will specify the "assertText" function, since we need to check for the presence of the text. In Target, specify the xpath locator for the title. In our case, the locator will be "// h1 [contains (text (), 'Category – QA / Testing')]". In the "Value" field, specify the expected text in the title. In our case it will be "Category – QA / Testing"
In order to check that our script works, press "Play" button.
After that, a browser window will open and we can see that our script is automatically executed.
After completing the case, open the Log tab in the lower block of the extension.
In the logs we should see the entry "Test case passed". Therefore, everything went well, the locators were selected correctly.
If we need to convert our script into an automated test written in the programming language we need , using some of its frameworks, click "Export" and in the "Format" drop-down menu, select the one we need.
We can copy the generated code into the IDE and perform various manipulations on it: refactoring, optimization, integration with existing test systems, etc.
In this article, we got to know the Katalon Recorder tool.
In particular, we studied the main features of this extension, wrote a simple test and ran it. Also, we got acquainted with the tool for exporting scripts to the required programming language / framework.
This tool is not without drawbacks, in the form of cumbersome locators and code duplication. However, these problems are minor and can be fixed by the refactoring.
All in all Katalon Recorder is a great browser extension which allows you to speed up the process of writing automated tests.