Record & Run Feature in Katalon Studio: Fast and Effective Test Automation

Test automation has become a crucial part of the software development process. However, writing test scenarios or defining items manually can be time-consuming for some developers and test engineers. This is where the "Record" feature of Katalon Studio comes into play. This feature speeds up and simplifies test automation by automatically recording and executing test scenarios.

Users can interact with an application by using the Record feature to make clicks, input text, and perform other interactions. Katalon Studio automatically converts these interactions into a test scenario and allows the user to edit it.

Benefits:

  • Rapid and efficient creation of test scenarios: The Record feature enables users to quickly create test scenarios.
  • Less coding required: Users can create scenarios by recording interactions rather than coding them manually.
  • Time and resource savings: Automatic recording and execution accelerate test automation and enable developers to work more efficiently.
  • Katalon supports the recording feature in web, mobile, desktop applications, and different browser types.

Let's Create an Example Test Scenario:

1-) Click on the Record button, which opens the web recorder screen.

2-) Enter the URL of the page to be tested.
Use the Expand button to extend the Web recorder page as follows.

3-) Start recording with the record button (chrome icon) next to the URL input. After starting the recording, the browser will open and navigate to the relevant site.

Additionally, recording can be started by selecting other browser types using the dropdown menu opened with the arrow icon next to Record (chrome icon).

4-) Manually create scenario steps on the application.

Example Test Scenario:

  1. Open the browser.
  2. Navigate to https://katalon-demo-cura.herokuapp.com.
  3. Click on the Make Appointment button.
  4. Enter the Username.
  5. Enter the incorrect Password.
  6. Click on the Login button.
  7. Verify redirection to the appropriate page.

When hovering over an element, the browser highlights the element and displays the corresponding XPath at the top of the page.

Step 3: Click on the Make Appointment button.
Every interaction you make on the web page (clicks, text input, etc.) is recorded.

 Recorded steps are automatically generated under Recorded Actions.

Step 4: Enter the Username.
Step 5: Enter the incorrect Password.
Step 6: Click on the Login button.

Right-click on the relevant element for verification and select actions available in Katalon Studio. For example, Verify Element Present can be selected.

Step 7: Verify redirection to the appropriate page. Right-click on the relevant element for verification and select actions available in Katalon Studio. For example, Verify Element Present can be selected. Check if the element is visible on the page.

You can edit the scenario steps reflected on the Web Recorder. You can delete steps, move them up or down. You can run the test scenario without saving it (converting it to a Test Case) by using the RUN button on the Web Recorder page and inspect the logs.

5-) Save the Script to save the test case. When you perform the save action, a window opens. This window displays a list of objects used and displayed on the screen, which are added to the Object Repository. You can associate these objects with the test scenario by creating a new folder.

After clicking the OK button, the test scenario is saved. A new test case is created under Test Case.

In summary:

  1. Record Mode:
  • When you initiate the Record feature, Katalon Studio enters recording mode.
  • In recording mode, all interactions you perform in the application are automatically recorded.
  • Interactions may include user clicks, text entries, form submissions, and selections.
  • While the user navigates the application, Katalon Studio automatically records every interaction made by the user.
  1. Scenario Creation:
  • All interactions performed in recording mode are used to automatically create a test scenario.
  • Based on the recorded interactions, Katalon Studio creates a test scenario.
  • The test scenario follows the user's interactions step by step and converts them into an automatically recorded scenario format.
  • The scenario covers specific functions of the application that need to be tested and is used to verify that these functions work correctly.
  1. Running the Scenario:
  • The created test scenario can be run in Katalon Studio's Run mode.
  • Users can run the selected scenario by selecting it or by editing the scenario code.
  • Katalon Studio automatically executes the selected scenario and checks whether specific functions of the application work as expected.
  • The result of the scenario is presented to the user through test reports, indicating errors or successes.
  1. Editing and Development:
  • The created test scenario can be edited or further developed later.
  • Users can customize the scenario by editing the recorded scenario or adding additional actions.
  • These edits make the test scenario more flexible and comprehensive, expanding the test scope.

Conclusion: Katalon Studio's Record and Run feature makes test automation more accessible and enables the rapid creation of test scenarios. This feature saves time and resources for developers and test engineers, making the software development process more efficient.