In this guide, you'll take your first steps with Katalon Platform and become familiar with some of its basic functions. You will accomplish this by creating your first automated software test in 5 simple steps.
You have created a Katalon account.
You have connected a Git repository for your project. To learn how to connect the Git repository to your project, refer to this document: Upload test scripts from the Git repository to Katalon TestOps.
You have installed Katalon Studio - Platform Edition. To install Katalon Studio - Platform Edition, you can refer to this document: Katalon Studio installation overview.
#1 Open the project in Katalon Studio - Platform Edition
- Open Katalon Studio - Platform Edition, you are prompted to activate the Studio 30-day trial license. Fill in your username and password, then click Activate.
- Once activated successfully, the Open Project dialog opens. Fill in the following information:
- Project: Select a Katalon project in the dropdown list. If you cannot find your project, click Fetch Project to fetch the latest projects.
- Git Repository URL: Once selecting a project, Katalon Studio - Platform Edition will retrieve all Git repositories available in that project. Select a Git test project you want to open.
- Username: Enter the username to access the Git repository.
- Personal Access Token: Enter your personal access token (PAT). To generate a PAT, you can refer to this GitHub document: Create a Personal Access Token.
- Branch: Choose a branch. If you cannot find a branch, click Fetch Branch to fetch the latest branches.
- Local Location: Choose the local location to store the test project.
- Click OK.
#2 Create your first test
This tutorial demonstrates how to create a WebUI test case using Web Record Utility in Katalon Studio - Platform Edition.
The application under test (AUT) is the CURA Healthcare Service demo website:
https://katalon-demo-cura.herokuapp.com/. We create a test to verify the successful login to the demo website. The basic steps are:
- Open the AUT in a browser.
- Click Make Appointment.
- Enter username and password to sign in.
Verify whether the Make appointment heading appears after the successful login.
- Close the application.
The test is successful if we successfully sign in the CURA Healthcare Service demo website.
You can clone the sample project here: Healthcare sample.
- From the main toolbar, click Record Web .
- A Web Recorder dialog appears. Enter the URL of your application.Here, we enter the demo website URL:
- Select a browser to start recording. Here, we choose the Chrome browser.You can click Expand, then click Show Captured Object to see recorded steps and captured objects while recording.
- Click Record. Wait until the browser is launched and ready to interact.
When you hover an element, the element is highlighted and displays its correspondent XPath on the top of the page.
- Record the test script as planned.
- We click Make appointment, fill in our demo username and password, then click Login.
- To verify the Make appointment heading after the successful login, mouse over the Make appointment text, right-click > Katalon Studio > Verify Element Present.
- Close browser.
- Once done, click Save script to stop recording and save the captured objects. Web Record Utility in Katalon exports a list of objects captured in the test case.Create a new folder or select an existing one in the Object Repository, then click OK.
- A pop-up dialog prompts you to name a new test case. Here, we name it TC1_Verify Successful Login. Click OK.
#3 Review your Record & Playback script
After each recording, you can see the recorded actions and generated test objects and how these are connected. Then use the Playback function to recheck your test scripts. This helps prevent errors.
This article will help you to familiarize yourself with the Studio user interface and explore the connection between the recorded actions and the object repositories.
The Katalon Studio user interface
After saving your recording, Katalon Studio opens the recorded test case in the editor view. Below are places you can interact with its associated test artifacts.
Tests Explorer: The Tests Explorer displays all folders, references, and files associated with the opened test project.
After saving your recording, a new test case and the captured test objects are located in the Test Cases and Object Repository folder respectively.
The test case editor displays the test case steps. You can add, edit, move or remove steps in a test case in different editing modes: manual or script.You can also add variables and additional information for the test case. To learn more about the tabs in the editor view, you can refer to this document: Toolbars and views.
The output section: Here displays the problems and errors before and during the test execution for troubleshooting.
Action #1 and #2: Open the browser and navigate to the website under test.
Action #3: Click Make Appointment button.
Action #4: Click the username text box and input the
Action #5: Click the password text box and input the password. When you enter the Password field, Web Recorder Utility uses the
Set Encrypted Textkeyword automatically. This helps encrypt the input value to ensure security.
Action #6: Click Login.
Action #7: Verify the Make Appointment heading in the successful login page.
Action #8: Close browser.
If you did not follow the recording instructions precisely, there may be extra recorded actions. If so, identify actions which do not belong to the intended test and delete them.
The actions listed above controls the UI elements in the application under test (AUT). These UI elements are represented by test objects in the Tests Explorer > Object Repository.
Double-click to open a test object. By default, these test objects are detected by Xpath. Once a test object is captured using Spy/Recorder, a set of XPath locators is generated. The first value is the object default XPath locator. You can view, edit, or delete these test objects.
The following pictures explain the captured test objects from our recording:
Object #1: a_Make Appointment
This test object represents the Make Appointment button.
Object #2: button_Login
This test object represents the Login button.
Object #3: h2_Make Appointment
This test object represents the Make Appointment heading
Object #4: input_Password_password
This test object represents the Password text box.
Object #5: input_Username_username
This test object represents the Username text box.
The link between actions and repository items
Actions that control UI elements, such as clicking a button, are automatically linked to the corresponding test object. In the manual mode of the test case editor view, you can see the test objects and the actions are in the same row.
Actions that don't control UI elements, such as opening a browser, aren't linked to test objects. The following pictures explains the relationship of actions and test objects in our recording.
1. The Item column: This lists the actions that control the test objects.
Here, the Set Text action inputs
John Doeinto the Username text box.
2. The Object column: This contains the test objects corresponding with the actions.
3. The Input column: This specifies the data that the action should input, for example: the text to fill in a text box, the delay time to open a browser.
After a recording, you can also playback to recheck your test scripts. To do so, open the test case you want to playback. From the main toolbar, click Run.
Katalon Studio will execute the chosen test case with the recorded steps accordingly.
#4 Run your first test
Run your test in Katalon Studio - Platform Edition with a local browser.
If you have subscribed to Katalon TestCloud, you can run your test in a cloud-based environment in Katalon TestOps. To learn more about running your tests with TestCloud, you can refer to this document: Integrate TestCloud with TestOps.
If you have set up a TestOps local agent, Kubernetes or CircleCI, you can schedule to run your test in Katalon TestOps. To learn more about running your test with a local agent on Katalon TestOps, you can refer to this article: Schedule Test Runs.
- In the test case editor, click Add to test suite. The test suite is where you manage and run your tests.
- In the dropdown list, you can choose Add to an existing test suite or Add to a new test suite. Here, we choose Add to a new test suite.
- A New dialog opens. Input the test suite name. Here, we name it TS-healthcare-tests.
- Click OK. Katalon Studio opens the test suite editor of the TS-healthcare-tests.
- Click Run.
- It might take a while for the test suite to run. When the test run starts, you can see:
1. The Job Progress bar: This bar allows you to see the progress of executing test cases and test suites/test suite collections.
2. The Log Viewer tab: This tab shows the real-time report/log of the test execution.
3. A pop-up browser windows that runs the recording steps.
#5 View test reports
Basic reports in Katalon Studio - Platform Edition
Advanced reports in Katalon TestOps
View basic reports in Katalon Studio - Platform Edition
Once a test suite finishes, you can view the latest test results in the Result tab of the test suite editor. This tab contains all information such as: test environment, total run test case, each test case result.
You can also view each test case log to identify the failed steps for quick troubleshooting by clicking Show Test Case Details.
Katalon Studio generates a folder corresponding to each test run in the Reports folder.
View advanced reports in Katalon TestOps
To view the test run results in TestOps, in the Tests Explorer panel, click TestOps > Test Runs.
You can view a summary of your test executions here. It might take a few minute to load the latest test execution. You can also click Refresh to fetch the latest data.
Click a test run ID to view the test run in Katalon TestOps.
Congratulations! You've just completed your first automated software test with Katalon Platform.
This is just a start! There are so much more to explore in Katalon Platform. You might want to learn more about:
BDD testing in Katalon Studio. See: BDD Testing Framework (Cucumber integration) overview.
API testing in Katalon Studio. See: Create your first API test with Katalon Studio.
Mobile testing in Katalon Studio. See: Introduction to Mobile Recorder in Katalon Studio.
Data-driven testing in Katalon Studio. See: Data-driven testing with Katalon Studio.