Introducing Katalium: Selenium and TestNG Made Easy
We’re thrilled to announce Katalium — a framework that provides a blueprint for test automation projects based on Selenium and TestNG.
When it comes to Selenium-based testing, Katalon Studio is a tool of choice for testers and automation engineers. The wide range of built-in features can help simplify the test case building process for users. However, for those who are still working with TestNG and Selenium, Katalium is a great head start.
Katalium retains the standard functions of Selenium and TestNG — however, our team tailored the framework to be more lightweight and accessible for all users. Katalium shortens the learning curve and transition efforts, allowing you to execute projects more quickly and more efficiently.
A component in the Katalium framework is the Katalium Server — a set of enhancements to improve your experience with Selenium Grid. This helps reduce the DevOps efforts required to configure, deploy, and maintain Selenium Grid. Monitoring and debugging get easier with real-time screenshots and automatically captured information.
For more detailed instructions, please visit our documentation.
Here’s how to get started:
Get Started with Katalium in Visual Studio Code
For further instructions, learn more here.
- Visual Studio Code
- Java Development Kit 8
- Install Katalium for Visual Studio Code here.
In Visual Studio Code, enter your Katalon email and password to activate.
- Create project. Click the Create Project button.
Note: Please clean your Workplace folder before creating a new project.
- Start Katalium Server. Click the Start Server button. After starting the server, open the browser in http://localhost:4444/.
Note: You can view server information in the Output tab. For example:
Create a Test Case
Test cases are essentially TestNG test classes. Katalium provides an abstract class com.katalon.kata.testng.TestTemplate with these convenient utilities:
- WebDriver is initialized before each test method and can be accessed with this.driver or driver. If the test method ends with a driver.quit() statement, a new WebDriver will be created for the next test method.
- Page instances are also pre-initialized using Selenium’s PageFactory. Refer to this guide to learn more about the Page Object Model.
Refer to this document for more details.
Create a Test Suite
Use TestNG syntax to define test suites and their parameters. More details
Test suites can be specified in command line, for example, mvn clean test -Dsurefire.suiteXmlFiles=src/test/resources/testng-parallel.xml.
TestNG provides a comprehensive mechanism for customizing parameters. More details
In Katalium, you can set default values for parameters in the file kata–default.properties (example), or during runtime using Java’s system properties, for example, mvn clean test -DkataBrowser=firefox.
This step comes in handy when you do not want to reconfigure unchanged parameters.
The default values of parameters can be accessed using this helper: com.katalon.kata.helper.ParameterHelper.
Katalium provides the class com.katalon.kata.helper.LogHelper to help retrieve org.slf4j.Logger instances with correct class names.
Logs will be printed out on the console and in TestNG XML reports.
Capture WebDriver’s actions
You can attach a custom org.openqa.selenium.support.events.AbstractWebDriverEventListener to capture WebDriver events. More details.
Questions, feedback, or bugs report? Please submit here.Trigger modal
We'd love to chat. Please fill out the form and we'll be in touch soon.