[Demo & Integration] TestProject Migration to Katalon

:information_source: This is Part 1 of our Demo & Integration series. Read the second part here: [Demo & Integration] Canvas Automation with Katalon

Hi Community members, :wave:

Following the launch of the Katalon Demo & Integration section on Katalon Academy, we will also be posting a series of accompanying topics to give you more context as well as the sample project used in each video.

Today we will be taking a look at the video TestProject Migration to Katalon.

:pushpin: Note: Please note that the video will be opened in a new tab.

Introduction

This project demonstrates how you can import and use your existing TestProject-based projects within Katalon Studio. It contains some of the test cases for Web Mobile and API test migration.

Requirement:

About TestProject

TestProject is an end-to-end automation tool that provides capabilities to automate Web, API, and Mobile applications. It is an open-source-friendly tool built on top of selenium and Appium. TestProject uses OpenSDK with Junit 5 for the building and execution of the test cases.

Repository for the Sample Project:

How to Migrate:

  1. Download a TestProject sample project

image

  1. Import all the required jars(build.gradle) Here

image

  1. Add all your project files inside Include >> Script >> groovy

image

  1. You have to fix all the errors

Change Junit 5 annotation to TestNG/Junit 4. (Katalon Studio does not support Junit 5 for now).

  • @BeforeAll >> @BeforeClass

  • @AfterAll >> @AfterClass

  1. Add @Test Annotation before the method “void execute()”

Initialise Katalon Webdriver inside the @BeforeClass.

For Web based application:

WebUiBuiltInKeywords.openBrowser("");
WebUiBuiltInKeywords.maximizeWindow();
driver = DriverFactory.getWebDriver();

For Mobile:

String dirName = RunConfiguration.getProjectDir():
MobileBuiltInKeywords.startApplication(dirName+"/App/APIDemos.apk", false);
driver = MobileDriverFactory.getDriver();

image

  1. Prepare TestNG.xml file by adding class name

image

  1. Prepare the test cases by adding TestNG or Junit Keywords
  2. Run the test execution Here

image

  1. Verify test execution result Here

image


Thanks for reading! :sunglasses:

:pushpin: See the rest of our Demo & Integration videos here.
:pushpin: You can find similar topics to this one by searching for the tag demo-integration

1 Like