SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
1
Test Case Creation in Katalon Studio
Problem Statement
How to Create a Test Case
Test Case Execution in Katalon Studio
How to Create a Test Case in Katalon Studio
A Katalon Studio user can create a Test Case from File > New > Test Case. (screenshot below)
A new window will pop up (as shown below), and the user can provide the Name and
Description of the Test Case. Then, an empty Test Case will be created, and it will be
displayed in the Test Cases folder in Tests Explorer section.
@RapidValue Solutions Page 2
Test Case Execution in Katalon Studio
Also, the Test Case can be created directly from the Tests Explorer section by a right click on
the Test Cases Folder. Then, you click New > Test Case. (figure shown below)
@RapidValue Solutions Page 3
Test Case Execution in Katalon Studio
The modes of Test Case execution can be explained with the help of a sample test case, which
is explained below.
Sample Test Case (Steps):
1. Navigate to URL “https://katalon-demo-cura.herokuapp.com/”
2. Click on “Make Appointment” button
3. Enter username and password, and click Login button
4. Select facility as “Seoul CURA Healthcare Center”
5. Enter any date in visit date field
6. Click “Book Appointment” button
The expected result is that the user should get an appointment confirmation.
Modes of Test Case Creation
There are 3 ways to create automation test in Katalon Studio.
1. Record and Replay:
This mode allows the user to create the test by recording the script and you can
replay the same by clicking the Run button
2. Manual Mode:
Katalon Studio has numerous built-in keywords, and this mode allows the user, with
less experience in programming, to perform an action by using these built-in
keywords.
3. Script Mode:
This mode allows the users, with good programming knowledge, to create test
cases. Here, the Automation Engineer can use the programming languages like
Groovy or Java to create and edit the test scripts.
All the 3 modes allow the user to add or edit the test case and prepare final automated test.
@RapidValue Solutions Page 4
Test Case Execution in Katalon Studio
1) Record and Replay:
Firstly, the user needs to create a Test Case (user can use any of the method which was
described earlier).
Then, a new window would open after clicking on the Record Web button (Screenshot below).
The window has a field called URL, and the user needs to provide the application URL in this
field. Beside the URL field, a button should be displayed, where the user can select the required
browser from the drop down.
Once after the button is clicked, a new browser instance should be opened. The user can
perform the steps mentioned in the sample Test Case, and all the user activities will be
recorded in the background. Then, the window should look like:
@RapidValue Solutions Page 5
Test Case Execution in Katalon Studio
Finally, the user needs to validate the expected result with the actual result. For validation, at
first the user needs to identify an object in the Final landing Page, and perform any action with
that particular object. Then the user needs to click on the Add button, and then a new tab will be
added in the 11th
row (as per the sample test case).The user needs to enter the keyword
“verify”, then a number of verify keywords will get listed, and from that list the user can select
the needed validation. For the verification item, the object can be added in the object field.
@RapidValue Solutions Page 6
Test Case Execution in Katalon Studio
Once after the user clicks OK, then Katalon will ask the user to add the elements to the object
repository. Here, the user will get the privilege to select the elements which should be added to
the object repository. Instead of the default object repository, user gets a chance to create a
new folder as well, to store the elements.
Now, the test case is ready, and the user can save it. For replaying, the user needs to click on
the Run button. Here also, the user will get the privilege to select the required browser from the
drop down.
2) Manual Mode:
This mode allows users, with less programming knowledge, to generate and execute the
automation test easily. Firstly, the user should capture the objects to be used in the test. In
order to achieve that a spy web button is available in Katalon Studio. Once after clicking the
spy web button, a new Object Spy window will get opened. Here, the user can put the URL
under test in the URL field.
@RapidValue Solutions Page 7
Test Case Execution in Katalon Studio
The user can capture the object by clicking on the mouse, and then he/she needs to press ALT
+.`
Then, the user needs to identify all the objects which are needed to complete the automation
test. Once after the user completes adding the objects, then he/she needs to save the objects
into the Object Repository. In order to achieve this, a Save button is available in the object spy
window.
Once the user clicks on the Save button, the window shown below would pop up which helps
the user to add the objects to Object Repository.
@RapidValue Solutions Page 8
Test Case Execution in Katalon Studio
Here, the user gets the privilege to check and uncheck the needed and unwanted objects. Also,
the user will be able to add a new folder if needed. Then, the OK button can be clicked. Once
the OK button is clicked, the user is able to see all the objects in the object repository in the
Tests Explorer.
There are other ways as well to capture objects by inspecting the element from the browser.
Secondly, the user needs to create a Test Case (user can follow any of the methods which are
described before).
By default, the test case will be opened in the manual mode. This allows users to develop the
scripts easily with very little programming
knowledge.
Select Add > Web UI Keyword from the command toolbar. Then, select the keywords to
perform the action.
@RapidValue Solutions Page 9
Test Case Execution in Katalon Studio
This can be explained with the help of the previously mentioned sample Test Case.
1. To open a browser, add the Open Browser.
2. To navigate to a specified URL, add the Navigate To Url keyword. Double click on
the Input cell to provide additional data (parameters) for the keyword. The Input dialog is
displayed as below. Each row represents one parameter. For now, enter the URL of
Katalon demo AUT into the Value column, and then click OK.
Here, Param Name is the name of the parameter; Param Type is the data type of the
parameter (e.g. String, Variable or Test Data Value); Value Type is the type of input
value (e.g. String, Variable or Test Data Value) and Value is the input value for this
parameter. Input value varies depending on the specified Value Type.
3. To click on an object, add the Click keyword and then the user needs to associate the
keyword with an object. Double click on the object field to provide the appropriate object
from the object repository.
@RapidValue Solutions Page 10
Test Case Execution in Katalon Studio
4. To perform the sendkeys action, add the Set Text keyword, and then associate the
keyword with the appropriate object. Double click on the Input cell and provide the input
text in the value field.
5. To select a value from the drop down, Katalon provides 3 keywords namely: (i) Select
Option By Index: Select the option at the given index. Index starts from 0. (ii) Select
Option By Value: Select the options with the given value. (iii) Select Option By Label:
Select the options with the given label (displayed text).
6. For verifying the element, add the Verify Element Present keyword which validates if
the given web element is present on DOM. Here, the user needs to associate the
keyword with an object. Double click on the object field to provide the appropriate object
from the object repository.
At last, the window will look like the one below (after following the test case) and the user needs
to save the test case, and then click on Run in the main toolbar to execute the test case.
3) Script Mode:
Katalon Studio allows expert users to programmatically write and execute automation test in the
Script mode.
At first, the user needs to create a Test Case (as mentioned earlier, the user can follow any of
the steps mentioned before to create a test case).
@RapidValue Solutions Page 11
Test Case Execution in Katalon Studio
Once a new test case is created, the user can switch to the Script mode using the
corresponding tab at the footer of the test case editor. The user can find some import
statements, which belongs to some default packages.
The user can start writing the test by using the package WEBUI. This is the package of Katalon
Studio which has all the in-built keywords. Once the user enters the dot character after the
package WEBUI, he/she will be able to find a number of suggestions for code completion.
@RapidValue Solutions Page 12
Test Case Execution in Katalon Studio
This mode of test case execution can be explained with the help of the previously mentioned
sample Test Case.
1. To open the browser, use the keyword openBrowser. This keyword helps the user to
open browser and navigate to the specified URL; if URL is left empty then just open
browser.
2. To navigate to a specified URL, use the keyword navigateToUrl. Here, the user needs
to pass the URL as a parameter. If the URL doesn't contain protocol prefix, then the
protocol will be http://.
3. To click on an object, use the keyword click and you need to pass the Test Object
parameter. To pass the object, the user can directly drag and drop the object from object
repository to the parameter field.
4. To perform the set text operation, use the keyword setText. Here, the parameters that a
user should pass are the object ID and the text. The user can drag and drop the object
to the object field.
5. To select a value from the drop down, Katalon provides 3 keywords (which are
mentioned in the manual mode description).
6. To perform the verification, the user can use the verified keywords. To cite an example,
if the user needs to verify that an element is present, user can use the keyword
verifyElementPresent. Here, the user needs to pass the parameters like object ID and
wait time.
The script mode window will look like the one below (after following the test case) and the user
needs to save the test case, and then click on Run in the main toolbar to execute the test case.
@RapidValue Solutions Page 13
Test Case Execution in Katalon Studio
Conclusion
This concludes the article on test case creation using Katalon Studio. Hope this could help you
to gather some useful information about the 3 different modes of creating Test Case in Katalon
Studio. In the upcoming blogs, there will be more focus on the Test Suite Creation and the
Report generation in Katalon Studio.
Happy Learning!
By,
Kiran M G, Senior Software Test Engineer.
@RapidValue Solutions Page 14
Test Case Execution in Katalon Studio
About RapidValue
RapidValue is a global leader in digital product engineering solutions including mobility, omni-channel,
IoT, AI, RPA and cloud to enterprises worldwide. RapidValue offers its digital services to the world’s top
brands, Fortune 1000 companies and innovative emerging start-ups. With offices in the United States, the
United Kingdom, Germany and India and operations spread across the Middle-East, Europe and Canada,
RapidValue delivers enterprise services and solutions across various industry verticals.
Disclaimer:
This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No
part of it may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are
not the intended recipient of this report, you are hereby notified that the use, circulation, quoting, or
reproducing of this report is strictly prohibited and may be unlawful.
@ RapidValue Solutions
www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com
+1 877.690.4844 contactus@rapidvaluesolutions.com
@RapidValue Solutions Page 15

Contenu connexe

Tendances

Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteria
basma_iti_1984
 

Tendances (20)

Automation Testing of Shadow DOM Elements with Katalon Studio
Automation Testing of Shadow DOM Elements with Katalon StudioAutomation Testing of Shadow DOM Elements with Katalon Studio
Automation Testing of Shadow DOM Elements with Katalon Studio
 
Execute Automation Testing in 3 Steps
Execute Automation Testing in 3 StepsExecute Automation Testing in 3 Steps
Execute Automation Testing in 3 Steps
 
Katalon studio vs selenium comparision
Katalon studio vs selenium comparisionKatalon studio vs selenium comparision
Katalon studio vs selenium comparision
 
How to select the right automated testing tool
How to select the right automated testing toolHow to select the right automated testing tool
How to select the right automated testing tool
 
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio
 
Katalon Recorder Web Automation.pptx
Katalon Recorder Web Automation.pptxKatalon Recorder Web Automation.pptx
Katalon Recorder Web Automation.pptx
 
Data driven testing
Data driven testingData driven testing
Data driven testing
 
Codeless Test Automation - A Webinar Presentation
Codeless Test Automation - A Webinar PresentationCodeless Test Automation - A Webinar Presentation
Codeless Test Automation - A Webinar Presentation
 
[Infographic] Challenges in Test Automation
[Infographic] Challenges in Test Automation [Infographic] Challenges in Test Automation
[Infographic] Challenges in Test Automation
 
Introduce Katalon tool
Introduce Katalon toolIntroduce Katalon tool
Introduce Katalon tool
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteria
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best Practices
 
Locator strategy for web elements | Katalon Studio
Locator strategy for web elements | Katalon StudioLocator strategy for web elements | Katalon Studio
Locator strategy for web elements | Katalon Studio
 
Test Case Management Tools
Test Case Management ToolsTest Case Management Tools
Test Case Management Tools
 
Developing a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian BayerDeveloping a test automation strategy by Brian Bayer
Developing a test automation strategy by Brian Bayer
 
N Unit Presentation
N Unit PresentationN Unit Presentation
N Unit Presentation
 
Smoke Testing
Smoke TestingSmoke Testing
Smoke Testing
 

Similaire à Test Case Creation in Katalon Studio

Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
Ramu Palanki
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
Ramu Palanki
 
Qtp 8.0 basic
Qtp 8.0 basicQtp 8.0 basic
Qtp 8.0 basic
medsherb
 
Interview questions in qtp
Interview questions in qtpInterview questions in qtp
Interview questions in qtp
Ramu Palanki
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)
Foyzul Karim
 
Qtp 9.2 Tutorial
Qtp 9.2 TutorialQtp 9.2 Tutorial
Qtp 9.2 Tutorial
guest37ae7f
 
qtp 9.2 features
qtp 9.2 featuresqtp 9.2 features
qtp 9.2 features
krishna3032
 
Qtp 92 Tutorial Anil
Qtp 92 Tutorial AnilQtp 92 Tutorial Anil
Qtp 92 Tutorial Anil
guest3373d3
 
Guide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation ToolGuide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation Tool
Subrat Srivastava
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5
Akhil Mittal
 

Similaire à Test Case Creation in Katalon Studio (20)

Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 
Qtp 8.0 basic
Qtp 8.0 basicQtp 8.0 basic
Qtp 8.0 basic
 
Qtp 80 Basics3561
Qtp 80 Basics3561Qtp 80 Basics3561
Qtp 80 Basics3561
 
Interview questions in qtp
Interview questions in qtpInterview questions in qtp
Interview questions in qtp
 
QTP Functions
QTP FunctionsQTP Functions
QTP Functions
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 
Qtp 9.2 Tutorial
Qtp 9.2 TutorialQtp 9.2 Tutorial
Qtp 9.2 Tutorial
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769
 
qtp 9.2 features
qtp 9.2 featuresqtp 9.2 features
qtp 9.2 features
 
Qtp 92 Tutorial
Qtp 92 TutorialQtp 92 Tutorial
Qtp 92 Tutorial
 
Ppt Qtp
Ppt QtpPpt Qtp
Ppt Qtp
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769
 
Qtp 92 Tutorial Anil
Qtp 92 Tutorial AnilQtp 92 Tutorial Anil
Qtp 92 Tutorial Anil
 
QTP Faqs
QTP FaqsQTP Faqs
QTP Faqs
 
SAP Testing Training
SAP Testing TrainingSAP Testing Training
SAP Testing Training
 
Guide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation ToolGuide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation Tool
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5
 

Plus de RapidValue

The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
RapidValue
 

Plus de RapidValue (20)

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins Pipeline
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in KotlinGuide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture -  Top Trends & Key Business BenefitsMicroservices Architecture -  Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack ChannelReal-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using ValgrindHow to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValueDevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
 
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
 

Dernier

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Dernier (20)

WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 

Test Case Creation in Katalon Studio

  • 1. 1 Test Case Creation in Katalon Studio Problem Statement How to Create a Test Case
  • 2. Test Case Execution in Katalon Studio How to Create a Test Case in Katalon Studio A Katalon Studio user can create a Test Case from File > New > Test Case. (screenshot below) A new window will pop up (as shown below), and the user can provide the Name and Description of the Test Case. Then, an empty Test Case will be created, and it will be displayed in the Test Cases folder in Tests Explorer section. @RapidValue Solutions Page 2
  • 3. Test Case Execution in Katalon Studio Also, the Test Case can be created directly from the Tests Explorer section by a right click on the Test Cases Folder. Then, you click New > Test Case. (figure shown below) @RapidValue Solutions Page 3
  • 4. Test Case Execution in Katalon Studio The modes of Test Case execution can be explained with the help of a sample test case, which is explained below. Sample Test Case (Steps): 1. Navigate to URL “https://katalon-demo-cura.herokuapp.com/” 2. Click on “Make Appointment” button 3. Enter username and password, and click Login button 4. Select facility as “Seoul CURA Healthcare Center” 5. Enter any date in visit date field 6. Click “Book Appointment” button The expected result is that the user should get an appointment confirmation. Modes of Test Case Creation There are 3 ways to create automation test in Katalon Studio. 1. Record and Replay: This mode allows the user to create the test by recording the script and you can replay the same by clicking the Run button 2. Manual Mode: Katalon Studio has numerous built-in keywords, and this mode allows the user, with less experience in programming, to perform an action by using these built-in keywords. 3. Script Mode: This mode allows the users, with good programming knowledge, to create test cases. Here, the Automation Engineer can use the programming languages like Groovy or Java to create and edit the test scripts. All the 3 modes allow the user to add or edit the test case and prepare final automated test. @RapidValue Solutions Page 4
  • 5. Test Case Execution in Katalon Studio 1) Record and Replay: Firstly, the user needs to create a Test Case (user can use any of the method which was described earlier). Then, a new window would open after clicking on the Record Web button (Screenshot below). The window has a field called URL, and the user needs to provide the application URL in this field. Beside the URL field, a button should be displayed, where the user can select the required browser from the drop down. Once after the button is clicked, a new browser instance should be opened. The user can perform the steps mentioned in the sample Test Case, and all the user activities will be recorded in the background. Then, the window should look like: @RapidValue Solutions Page 5
  • 6. Test Case Execution in Katalon Studio Finally, the user needs to validate the expected result with the actual result. For validation, at first the user needs to identify an object in the Final landing Page, and perform any action with that particular object. Then the user needs to click on the Add button, and then a new tab will be added in the 11th row (as per the sample test case).The user needs to enter the keyword “verify”, then a number of verify keywords will get listed, and from that list the user can select the needed validation. For the verification item, the object can be added in the object field. @RapidValue Solutions Page 6
  • 7. Test Case Execution in Katalon Studio Once after the user clicks OK, then Katalon will ask the user to add the elements to the object repository. Here, the user will get the privilege to select the elements which should be added to the object repository. Instead of the default object repository, user gets a chance to create a new folder as well, to store the elements. Now, the test case is ready, and the user can save it. For replaying, the user needs to click on the Run button. Here also, the user will get the privilege to select the required browser from the drop down. 2) Manual Mode: This mode allows users, with less programming knowledge, to generate and execute the automation test easily. Firstly, the user should capture the objects to be used in the test. In order to achieve that a spy web button is available in Katalon Studio. Once after clicking the spy web button, a new Object Spy window will get opened. Here, the user can put the URL under test in the URL field. @RapidValue Solutions Page 7
  • 8. Test Case Execution in Katalon Studio The user can capture the object by clicking on the mouse, and then he/she needs to press ALT +.` Then, the user needs to identify all the objects which are needed to complete the automation test. Once after the user completes adding the objects, then he/she needs to save the objects into the Object Repository. In order to achieve this, a Save button is available in the object spy window. Once the user clicks on the Save button, the window shown below would pop up which helps the user to add the objects to Object Repository. @RapidValue Solutions Page 8
  • 9. Test Case Execution in Katalon Studio Here, the user gets the privilege to check and uncheck the needed and unwanted objects. Also, the user will be able to add a new folder if needed. Then, the OK button can be clicked. Once the OK button is clicked, the user is able to see all the objects in the object repository in the Tests Explorer. There are other ways as well to capture objects by inspecting the element from the browser. Secondly, the user needs to create a Test Case (user can follow any of the methods which are described before). By default, the test case will be opened in the manual mode. This allows users to develop the scripts easily with very little programming knowledge. Select Add > Web UI Keyword from the command toolbar. Then, select the keywords to perform the action. @RapidValue Solutions Page 9
  • 10. Test Case Execution in Katalon Studio This can be explained with the help of the previously mentioned sample Test Case. 1. To open a browser, add the Open Browser. 2. To navigate to a specified URL, add the Navigate To Url keyword. Double click on the Input cell to provide additional data (parameters) for the keyword. The Input dialog is displayed as below. Each row represents one parameter. For now, enter the URL of Katalon demo AUT into the Value column, and then click OK. Here, Param Name is the name of the parameter; Param Type is the data type of the parameter (e.g. String, Variable or Test Data Value); Value Type is the type of input value (e.g. String, Variable or Test Data Value) and Value is the input value for this parameter. Input value varies depending on the specified Value Type. 3. To click on an object, add the Click keyword and then the user needs to associate the keyword with an object. Double click on the object field to provide the appropriate object from the object repository. @RapidValue Solutions Page 10
  • 11. Test Case Execution in Katalon Studio 4. To perform the sendkeys action, add the Set Text keyword, and then associate the keyword with the appropriate object. Double click on the Input cell and provide the input text in the value field. 5. To select a value from the drop down, Katalon provides 3 keywords namely: (i) Select Option By Index: Select the option at the given index. Index starts from 0. (ii) Select Option By Value: Select the options with the given value. (iii) Select Option By Label: Select the options with the given label (displayed text). 6. For verifying the element, add the Verify Element Present keyword which validates if the given web element is present on DOM. Here, the user needs to associate the keyword with an object. Double click on the object field to provide the appropriate object from the object repository. At last, the window will look like the one below (after following the test case) and the user needs to save the test case, and then click on Run in the main toolbar to execute the test case. 3) Script Mode: Katalon Studio allows expert users to programmatically write and execute automation test in the Script mode. At first, the user needs to create a Test Case (as mentioned earlier, the user can follow any of the steps mentioned before to create a test case). @RapidValue Solutions Page 11
  • 12. Test Case Execution in Katalon Studio Once a new test case is created, the user can switch to the Script mode using the corresponding tab at the footer of the test case editor. The user can find some import statements, which belongs to some default packages. The user can start writing the test by using the package WEBUI. This is the package of Katalon Studio which has all the in-built keywords. Once the user enters the dot character after the package WEBUI, he/she will be able to find a number of suggestions for code completion. @RapidValue Solutions Page 12
  • 13. Test Case Execution in Katalon Studio This mode of test case execution can be explained with the help of the previously mentioned sample Test Case. 1. To open the browser, use the keyword openBrowser. This keyword helps the user to open browser and navigate to the specified URL; if URL is left empty then just open browser. 2. To navigate to a specified URL, use the keyword navigateToUrl. Here, the user needs to pass the URL as a parameter. If the URL doesn't contain protocol prefix, then the protocol will be http://. 3. To click on an object, use the keyword click and you need to pass the Test Object parameter. To pass the object, the user can directly drag and drop the object from object repository to the parameter field. 4. To perform the set text operation, use the keyword setText. Here, the parameters that a user should pass are the object ID and the text. The user can drag and drop the object to the object field. 5. To select a value from the drop down, Katalon provides 3 keywords (which are mentioned in the manual mode description). 6. To perform the verification, the user can use the verified keywords. To cite an example, if the user needs to verify that an element is present, user can use the keyword verifyElementPresent. Here, the user needs to pass the parameters like object ID and wait time. The script mode window will look like the one below (after following the test case) and the user needs to save the test case, and then click on Run in the main toolbar to execute the test case. @RapidValue Solutions Page 13
  • 14. Test Case Execution in Katalon Studio Conclusion This concludes the article on test case creation using Katalon Studio. Hope this could help you to gather some useful information about the 3 different modes of creating Test Case in Katalon Studio. In the upcoming blogs, there will be more focus on the Test Suite Creation and the Report generation in Katalon Studio. Happy Learning! By, Kiran M G, Senior Software Test Engineer. @RapidValue Solutions Page 14
  • 15. Test Case Execution in Katalon Studio About RapidValue RapidValue is a global leader in digital product engineering solutions including mobility, omni-channel, IoT, AI, RPA and cloud to enterprises worldwide. RapidValue offers its digital services to the world’s top brands, Fortune 1000 companies and innovative emerging start-ups. With offices in the United States, the United Kingdom, Germany and India and operations spread across the Middle-East, Europe and Canada, RapidValue delivers enterprise services and solutions across various industry verticals. Disclaimer: This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful. @ RapidValue Solutions www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com +1 877.690.4844 contactus@rapidvaluesolutions.com @RapidValue Solutions Page 15