Table of contents
1.
Introduction
2.
Develop a customized report plugin
2.1.
Project Structure
2.2.
Build the Plugin
2.3.
Using the generated Plugin
3.
Generate a groovy doc for a plugin
3.1.
Add documentation title to build.gradle
3.2.
Add dependencies to build.gradle
3.3.
Build the project
3.4.
Add the project to the katalon-plugin-docs repository
4.
Frequently Asked Questions
4.1.
How do I use custom keywords in Katalon Studio?
4.2.
Which language is used in Katalon?
4.3.
How do you create a report in Katalon Studio?
5.
Conclusion
Last Updated: Mar 27, 2024
Medium

Develop a customized report plugin and generate groovy doc in katalon

Author Sanjana Yadav
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Hello Reader!! 

In this journey of web testing tools, we are currently focusing on the Katalon studio. We have already learned to create test cases and run them, skip test cases, etc.

Now we will explore another feature of Katalon and learn to create create a customized report plugin. We will also learn to generate a Groovy doc in Katalon. 

Develop a customized report plugin and generate groovy doc in katalon

So, without any further ado, let’s get started!!

Develop a customized report plugin

We will use a sample custom keyword plugin to generate a customized report. This plugin includes a test listener that produces a customized test suite report as a text file in the Reports folder.

Project Structure

The relevant project structure should be similar to the structure given below:

Project Structure

The above structure in Katalon studio looks like this:

Project Structure

Build the Plugin

  1. Open the project as above with Katalon studio.
  2. Inside the root folder, run the command below
    gradle katalonPluginPackage

After that, the plugin will be located at build/libs/katalon-studio-sample-report-plugin.jar.

Using the generated Plugin

To start using the generated Plugin, copy the above jar file and place it under the Plugins folder of your Katalon project.

And now you are good to go!

Generate a groovy doc for a plugin

In addition to uploading your plugin to the Katalon Store, you can also create documentation in groovydoc and add it to the store.

We will learn to create this documentation in this section.

Add documentation title to build.gradle

  1. Open the project.
  2. Open build.gradle file given at the bottom in the Tests explorer.

Add documentation title to build.gradle

3. Update the docTitle. Refer to the example code below:

groovydoc {
source = pluginSources
 docTitle = 'FindAndReplace Custom Keywords'
}

Add dependencies to build.gradle

You can also add dependencies to build.gradle file. This is an optional feature.

To add dependencies, refer to the example below:

dependencies {
 compile('com.paulhammant:ngwebdriver:1.1.4') {
  exclude group: 'org.seleniumhq.selenium'
 }

 Remove the command lines if you don't have the dependencies.

Build the project

To build the project, go to the root folder of your project and run the following command:

gradle groovydoc -x compileGroovy

Add the project to the katalon-plugin-docs repository

Following are the steps to add your project to katalon-plugin-docs:

  1. Visit katalon-plugin-docs/katalon-plugin-docs.github.io/
  2. Go to the docs folder and upload your file here.
  3. Make a pull request and await approval.

Frequently Asked Questions

How do I use custom keywords in Katalon Studio?

From the main menu, choose File > New > Keyword. The New Keyword dialog box appears. Enter a name for your keyword and select a package for it. Select OK.

Which language is used in Katalon?

Katalon Studio uses Groovy, a Java-based language, and must load several libraries for parsing test data, test objects, and logging.

How do you create a report in Katalon Studio?

Select your desired format for the reports generated after each test suite execution under Project > Settings > Plugins > Report.

Conclusion

To sum up the article, we learned to Develop a customized report plugin using a custom keyword plugin in Katalon studio. We also learned how to generate a Groovy doc in Katalon.

We hope that this blog has helped you understand the Katalon Studio and its working. To learn more about Katalon and its several features, you can refer to

You can also visit our website to read more such blogs. Make sure you enroll in the courses we provide, take mock tests, solve problems, and interview puzzles. Also, you can prepare for interviews with interview experiences and an interview bundle.

Keep learning and keep growing, Ninjas!

Thank you
Live masterclass