Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
For users with less experience, the Katalon Platform offers a convertible manual or script view for creating automated tests with syntax highlighting and code completion. The Katalon Platform uses the Page Object Model design pattern. Using the recording tool, GUI components from the web, mobile, and desktop apps may be recorded and saved into the Object Repository, which is available and reusable across many test cases.
Katalon platform provides various tools like Katalon Studio, Katalon Studio Enterprise, Katalon Runtime Engine, Katalon TestCloud, Katalon TestOps, and Katalon Recorder.
Here in this blog, we will see some of the sample Katalon projects to get familiar with the Katalon Studio. And will also see how to create some basic projects in Katalon Studio. So what are we waiting for? Let us get started.
Sample Project Overview
What if you get a sample project before working on any final project? Isn’t it will be easy to deal with it? Katalon has done the same. It has provided some sample projects to learn about the Katalon Studio. It has created many sample projects for each testing type. To open those sample projects, you need Katalon Studio. After installing Katalon Studio, select a sample project by going to File/New Sample Projects. Here we will see some of the primary projects given by Katalon.
Website testing (Healthcare sample)
Data-driven testing for web user interfaces (Shopping Cart sample)
Testing of APIs
Mobile testing, with example projects for Android and iOS
Testing of BDD (Cucumber)
Sample BDD (Cucumber) tests project
In this blog section, we will see the Sample BDD (Cucumber) tests project provided by Katalon. To open the Sample BDD (Cucumber) tests project, go to File > New Sample Project > Sample BDD (Cucumber) tests project.
You can also download all the sample projects in the Katalon GitHub repository.
Sample BDD (Cucumber) tests project components
Profiles
Go to Profiles > default and click the Execution Profile link. All global variables can be created and saved in the execution profile. They apply to all test cases in your project. Katalon produces one global variable in this example project: baseURL.
Feature files
Go to Include > features > operations for accessing the sample feature files. To open one of the following. feature files, double-click it.
Minus. feature: This file describes how to use the react calculator's minus actions.
Plus. feature: This document describes how to use the react calculator's plus actions.
Multiply. feature: This file describes how to use the React calculator's multiplying feature.
Divide. feature: This file describes the scenario using the react calculator's division features.
Step definitions
To execute the scenario in the feature files, each Gherkin step needs to be defined as a collection of programming codes. The step definitions in this sample test project can be found under Include > scripts > groovy.
Two distinct packages include the step definition files:
The standard package: The Common. groovy file, which specifies the Given and Then stages for all feature files, is part of the default package.
The operations bundle: Four-step definition files representing the four operations—subtraction (-), addition (+), division (/), and multiplication(x)—are included in the operations package.
Custom keywords
In this example project, Katalon generates a unique keyword. Go to Keywords > sample > ClickNumber.groovy in the Test Explorer tab to view the custom keyword.
Click number; the react calculator receives a number that is converted into an integer using the clickNumber keyword. The number is the only parameter for this keyword.
Test listeners (Test hooks)
Test steps called test listeners or test hooks specify events before or after a test case or test suite.
Go to the Test Listeners folder in the Test Explorer panel to see the test listeners for this project. Two test listeners were made:
Listener: After each test case execution, this test listener shuts down the browser.
TestListener: This test listener launches the Katalon Helper before each test suite run.
Test cases
Go to Test Cases > operations in the Test Explorer panel to find the primary test cases for this project.
Four test cases are provided, each of which represents a distinct operation: subtraction (-), addition (+), division (/), and multiplication (x). The main flow is identical throughout these four test cases. The primary flow of the test case Verify Plus is described here. With the provided numbers, this test case adds them together.
The Plus. feature file is processed in the following ways by the test case Verify Plus:
Step 1: The test case is called. The Calculator page has been loaded. This test case activates the React calculator.
Step 2: A call to the test case Plus number is made in the When step. This test case:
Uses the ClickNumber.clickNumber keyword to the input given numbers on the react calculator.
Click the equal (=) and plus (+) buttons on the calculator.
Step 3: The test case is called in the Then step. Result check. This test case checks to see if the calculator's output matches the output specified in the feature file.
Test suites
The example test suite illustrates data-driven testing for web services. Go to Test Suite > Verify Operations in the Test Explorer window to examine the sample test suite.
The four test cases in this test suite correspond to the four operations: subtraction (-), addition (+), division (/), and multiplication (x).
Execute selected test cases or test suites
In the example project, to run a test case or test suite:
1. Decide the test case or test set you want to run.
2. Either click Run or use Ctrl + Shift + A (Cmd + Shift + A on a macOS).
3. Check the Log Viewer tab to see the test result.
Frequently Asked Questions
Which framework does Katalon employ?
The Katalon Testing Platform, based on the hybrid test automation architecture, gives testing experts the full range of testing options for testing software and applications.
Do you need to code Katalon?
For customers with varying levels of coding expertise, Katalon offers two scripting interfaces. As a result, testers with no programming experience can use a user interface that is easier to use.
Is Katalon open source?
This program can automate front-end online applications, mobile apps, and web services, even if it is not open source or free.
Conclusion
To conclude this blog, we have discussed a sample project by Katalon. Then we saw Sample BDD (Cucumber) tests project, its profile, features files, step definitions, custom keywords, test listeners, test cases, and test suites.