Table of contents
1.
Introduction
2.
Add your dependencies to the build.gradle File​
3.
Frequently Asked Question
3.1.
Is Katalon Studio better than Selenium?
3.2.
What is a GUI testing tool?
3.3.
Is Katalon cloud-based?
3.4.
What are two types of scripting?
3.5.
Which language is best for SaaS?
4.
Conclusion
Last Updated: Mar 27, 2024
Medium

How to resolve external dependencies for a plugin

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

Introduction

Hey Readers!!

Do you know about plugins in Katalon Studio?

The Katalon plugin searches Test Objects by the attributes listed in the Test Object physical files.

In this article, you'll learn How to resolve external dependencies for a plugin.

Let's begin!!

How to resolve external dependencies for a plugin

Add your dependencies to the build.gradle File

To add your dependencies to the build.gradle File does as follows:

1. Go to File> New > Project, and select Generate to build.gradle file box.

Given below is the Default build.gradle template is generated

Default build.gradle

2. Now Add the dependencies to the build.gradle File.

Enter the following code in the build.gradle File: For Gradle 7

plugins {
  id 'java-library'
  id 'groovy'
  id 'com.github.johnrengelman.shadow' version '7.1.2'
  id 'com.katalon.gradle-plugin' version '0.1.1'
}
repositories {
  mavenCentral()
}
def pluginSources = [
  'Keywords',
  'Test Listeners',
  'Include/scripts/groovy'
]
sourceSets {
   main {
    groovy {
      srcDirs = pluginSources
      srcDir 'Libs' // generated by Katalon Studio
    }
  }
}
shadowJar {
  exclude 'Temp*.class'
}
groovydoc {
  source = pluginSources
  docTitle = 'Zip Custom Keywords'
}
dependencies {
  implementation 'net.lingala.zip4j:zip4j:1.3.2'
}
Default build.gradle

Enter the following code in the build.gradle File: For Gradle 5-6

plugins {
  id 'java'
  id 'groovy'
  id 'com.github.johnrengelman.shadow' version '4.0.4'
  id "com.katalon.gradle-plugin" version "0.0.7"
}
repositories {
  jcenter()
  mavenCentral()
}
sourceSets {
  main {
    groovy {
     srcDirs = ['Keywords', 'Libs', 'Test Listeners', 'Include/scripts/groovy']
    }
  }
}
dependencies {
compile 'net.lingala.zip4j:zip4j:1.3.2'
}
shadowJar {
exclude 'Temp*.class'
}
katalon {
  dependencyPrefix = "com.katalon"
minimize = false
}
Default build.gradle

Your dependencies are repackaged in this way to prevent conflicts with other plugins.

Frequently Asked Question

Is Katalon Studio better than Selenium?

In general, Selenium is faster than Katalon studio. The reason is that Katalon is built on Java and uses the scripting language Groovy.

What is a GUI testing tool?

A proper GUI (graphical user interface) is always helpful in capturing the user's attention. Hence, GUI testing tools are used to test the application's user interface.

Is Katalon cloud-based?

The cloud-hosted Katalon TestCloud system offers on-demand, adaptable, and secure multi-browser testing environments.

What are two types of scripting?

Languages for scripting might be either client-side or server-side.

Which language is best for SaaS?

Ruby is a language that is for SaaS. It is a flexible, portable language primarily used to create desktop SaaS applications.

Conclusion

This blog has extensively discussed how to resolve external dependencies for a plugin. We hope this article helped enhance your knowledge about, Adding your dependencies to the build.gradle File and resolving external dependencies for a plugin.

If you want to learn more deeply, check out the excellent content on the Coding Ninjas Website:

How to develop a Custom Keywords plugin in KatalonHow to Install plugins offline and work with them in Katalon?Create your first Katalon Studio plugin

Refer to our guided paths on the Coding Ninjas Studio platform to learn more about DSA, DBMS, Competitive Programming, Python, Java, JavaScript, etc. 

Refer to the links problemstop 100 SQL problemsresources, and mock tests to enhance your knowledge.

For placement preparations, visit interview experiences and interview bundle.

Thank You

Do upvote our blog to help other ninjas grow. Happy Coding!

Live masterclass