DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Munit: Parameterized Test Suite
  • Smoke Testing and the Spaceship Analogy
  • Any Version of the Test Pyramid Is a Misconception – Don’t Use Anyone
  • 6 of the Best API Testing Tools in the Market

Trending

  • DZone's Article Submission Guidelines
  • Docker Base Images Demystified: A Practical Guide
  • How Large Tech Companies Architect Resilient Systems for Millions of Users
  • A Developer's Guide to Mastering Agentic AI: From Theory to Practice
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. A Sample Web Automation Test Project

A Sample Web Automation Test Project

In this tutorial, you'll learn how to get started with Katalon Studio to automate your web testing to make writing test cases a whole lot easier.

By 
Oliver Howard user avatar
Oliver Howard
·
Oct. 28, 17 · Tutorial
Likes (8)
Comment
Save
Tweet
Share
25.3K Views

Join the DZone community and get the full member experience.

Join For Free

Starting a new automation project for a website can be complicated and requires a steep learning curve, especially to those who are new to automation testing. The following tutorial will help you ease that process using Katalon Studio.

Test Scenario

For this tutorial, we are using Katalon Studio to test the dummy web app (CURA) accessible at http://demoaut.katalon.com. CURA is a simple health care service that allows patients to book appointments with doctors.

In this tutorial, we create a test case to test the following flow:

  • Login
  • Book an appointment
  • Check if the appointment is booked successfully
  • Logout

Get Started

Create an automation testing project in Katalon Studio as below:

Katalon1
Katalon2


Image title

Image title

The newly created test case is generated in form of a Groovy language script file (also called test script) which can be viewed and edited in Katalon Studio by one of two view modes: Manual View and Script View.

Composing Automation Test Cases

Please refer to the Test Design page for detailed instructions to compose test steps in various modes using different utilities. For a starter, we recommend using the Record – Playback function to get familiar with the scripting process. Katalon Studio is capable of generating test steps quickly.

  • Click on the Record Toolbar button to open the Record dialog, then enter “http://demoaut.katalon.com” for the URL field and select Chrome on the dialog to start recording.

Katalon recording

Image title

  • A new Chrome browser instance with the CURA website will be activated. Click on Make Appointment.

Image title

  • Enter “John Doe” for the username and “ThisIsNotAPassword” for the password on the login page.

Image title

  • On the Make Appointment page, fill in necessary appointment information and click on the Book Appointment button to book an appointment.

Image title

  • The Appointment Confirmation page will show up. Click the Logout button to complete the recorded session.

Image title

  • Switch back to Katalon Studio Record dialog and you can see all the actions and web elements recorded. Click on OK to finish the recording and generate necessary test steps and test scripts.

Image title

  • The recorded test scripts can be playback instantly. Click the Run button with a preferred browser to start running your test case.

Image title

  • The recorded test scripts should run smoothly, but you will notice the test fails at Step 14 (Click on “a_Logout” element) with the error message “Unable to click on object ‘Object Repository/Page CURA Healthcare Service (3)/a Logout’”. Don’t worry, this can be fixed using the following steps.

Complete Your First Test Case

If you investigate to the failed message of the test execution, it includes the message “org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point.”

It happens because when the Side Menu of CURA website is open, the animation causes the Logout element to appear slowly and so Katalon Studio’s playback is unable to recognize it. To fix this issue, we need to include a Wait step right before the logout step using the keyword waitForElementClickable, use “a_Logout” element as the object and change the timeout input to 5 seconds.

Image title

  • Run the test case again, you will see the Log out button is found and the step passes.

Generate a Report

To generate test reports, we need to have a test suite. A test suite in Katalon Studio is where you group test cases to run them together.

  • To create a test suite, click on the New toolbar button and select the New Test Suite item.

Image title

  • In the New Test Suite dialog, enter the required name and an optional description about your test suite, click OK to create a new test suite:

Image title

  • From the test suite UI, click the Add button and check the “Basic” test case then click OK to add the selected test case to the test suite.

Image title

Execute this test suite as we did with the test case by clicking on the Execution toolbar. After the execution, you will notice that a new report folder is generated. In this folder, each of the child items represents an execution with the name indicating the starting time of the execution. Click on the first report item to view. The report is shown as below:

Image title

The test report’s detail is shown as below (with “Show Test Case Details” selected)

Image title

For additional tutorials and guidelines please visit Katalon Studio documentation. If you have any question, feel free to join the Forum and chat with other users.

Test design Test case Katalon Studio Web Service Test suite

Opinions expressed by DZone contributors are their own.

Related

  • Munit: Parameterized Test Suite
  • Smoke Testing and the Spaceship Analogy
  • Any Version of the Test Pyramid Is a Misconception – Don’t Use Anyone
  • 6 of the Best API Testing Tools in the Market

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!