by M. Faris
Report Issues »
Table of Contents
This is a POC Groovy/Java project for Automation Testing using Katalon to test OrangeHRM website. The goal of this project is to demonstrate how an Automation Testing is done using various combination of tools/frameworks. Of course this project is not limited to its current conditions. You may clone it to your own environment and customize it further depending on your needs.
OrangeHRM is an open-source human resource management (HRM) software platform. It provides a comprehensive set of HR functionalities to businesses of all sizes, including features for personnel information management, attendance tracking, leave management, performance evaluation, and other HR-related tasks.
- Katalon Studio v8 (then v9 for Jira integration)
- Unofficial Jira Client 0.5
- OrangeHRM Login (Positive & negative scenarios)
- OrangeHRM Password Reset (Positive & negative scenarios)
- OrangeHRM Username Search (Positive & negative scenarios)
- OrangeHRM Add New User Account (Positive & negative scenarios)
- OrangeHRM Delete User Account (Positive & negative scenarios)
- OrangeHRM Add New Job Title (Positive & negative scenarios)
- OrangeHRM Delete Job Title (Positive & negative scenarios)
- OrangeHRM Add Pay Grade (Positive & negative scenarios)
- OrangeHRM Add Currency (Positive & negative scenarios)
- OrangeHRM Delete Currency (Positive & negative scenarios)
- OrangeHRM Edit Currency (Positive & negative scenarios)
- OrangeHRM Add Employment Status (Positive & negative scenarios)
- OrangeHRM Delete Employment Status (Positive & negative scenarios)
- OrangeHRM Add Job Category (Positive & negative scenarios)
- OrangeHRM Delete Job Category (Positive & negative scenarios)
- OrangeHRM Add New Skill (Positive & negative scenarios)
- OrangeHRM Delete Skill (Positive & negative scenarios)
- OrangeHRM Edit Skill (Positive & negative scenarios)
The following are the instructions on setting up your project locally. To get a local copy up and running, follow these simple steps.
The following prerequisites that you will need to get started:
- This repo of course! You may download it as a zip file or "git clone" it to your computer.
- Installed Katalon Studio.
Optional
- A Jira Cloud account.
- A Linux server (for usage with CI). I recommend using VirtualBox for starters. You can also checkout on AWS EC2 instances for running CI on cloud server (you need credit card to register for them).
- Jenkins, if you intend to use the project with CI (I've only tested this, you may experiment with others at your own risk). Get to know more about CI.
-
Ensure that you have extracted or git-cloned the project folder into your local computer.
-
Open the project folder in Katalon Studio.
-
[Optional] If you want to utilize the Jira integration, look for
local.properties
inInclude/config
. Configure it as follows:jira.enabled= # true or false jira.url= # your Jira URL. Do not forget the ending slash! You may leave it blank if false. jira.username= # your Jira username (email address). You may leave it blank if false. jira.token= # your Jira user token. You may leave it blank if false. Refer here on how to get them https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ jira.project= # your Jira project code. e.g. STC. You may leave it blank if false.
-
Update WebDrivers: Tools -> Update WebDrivers -> Your preferred browser.
-
Choose and open by double-clicking any of the Test Cases or Test Suites in
Test Cases
orTest Suites
folder. -
Change profile/environment to
DemoLive
to be able to use all the variables/parameters specified in Test Cases. It is located on the top right, named "default". -
Click the Play button on the top right.
-
If you use Jira and enabled Jira in
local.properties
, all the failed Test Cases will be recorded as a Bug in your Jira Backlog.
-
I will be referring to the use case of Jenkins in a Linux server where the job will run as a pipeline and not involving any Docker images.
-
If you are not using/stating any Docker images in your pipeline, your Linux server (where Jenkins was installed or where the Jenkins job will be running) must have the following installed:
i. OpenJDK
sudo apt install openjdk-17-jdk
ii. Browser (I'll take Chrome as an example)
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt --fix-broken install ./google-chrome-stable_current_amd64.deb google-chrome --version
iii. Katalon Runtime Engine (KRE)
wget https://download.katalon.com/9.3.2/Katalon_Studio_Engine_Linux_64-9.3.2.tar.gz sudo tar xvzf ./Katalon_Studio_Engine_Linux_64-9.3.2.tar.gz sudo mv ./Katalon_Studio_Engine_Linux_64-9.3.2 ./kre sudo chmod -R 777 ./kre
-
You can refer to the sample
jenkins_pipeline_katalon.txt
to assign respective values such as the directory of KRE, project folder, etc. Copy the contents (in the txt file) to your Jenkins job settings -> Pipeline (Pipeline script). -
If your first time build is failed, consider moving/copying the KRE folder into the Jenkins workspace folder.
sudo cp -r /home/<your OS username>/kre /var/lib/jenkins/workspace/<name of job>/kre sudo chmod -R 777 /var/lib/jenkins/workspace/<name of job>/kre
Side note: I have tried running Jenkins in 1GB RAM and 1 core CPU Linux virtual machine using VirtualBox, it works! Although AWS EC2 Free Tier has almost the same specs (t2.micro with 1GB RAM, 1 core CPU, Linux OS), it doesn't work! No need to waste your time. It freezes on my Free Tier EC2 instances. Just get a higher paid t2 instances to be able to run Jenkins properly. Explanation 1, Explanation 2, Explanation 3
M. Faris - Facebook - mfaris.official@gmail.com
GitHub : mfarisgh
GitLab : mfarisgl