In this article, I will introduce the concept of codeless automation as an innovative and efficient solution for software testing with minimal coding. Performs to increase the importance of time-to-market in product success, codeless automation helps to reduce testing time in release cycles, making it a growing trend in software testing.
One of the most notable codeless automation frameworks is Ginger, an open-source tool created and published by Amdocs under an Apache 2.0 license.
Advantages of codeless automation over traditional code-based automation:
- No programming skills are required
- Test automation can start from day 1
- Keep pace with the development cycle
- Faster and more efficient test development
Ginger is a free and open-source automation framework with the following features:
- AI-driven automation
- Supports various platforms such as web, mobile, windows, APIs, etc.
- Simple drag-and-drop approach for codeless automation
- Dynamic Error handling with self-healing capabilities
- Ability to reuse existing automation scripts
- Reduced average repair time
- Software reusability across the software lifecycle
- Automates visual validations
- Built-in integrations with popular open-source tools such as QC, Jira, CI/CD, Jenkins, Bambootools, and others.
Similarly, we will expand the Ginger to investigate and create a web application automation script:
Where can you find Ginger?
You need to Visit “ginger.amdocs.com” and download the latest version of the tool. Below you can see the dashboard.
How do you set up Ginger?
Once the Ginger is downloaded, now double-click on the application file, and a license agreement window will be displayed – select ‘I accept the agreement’, browse the destination location where you want it installed, and click on ‘Next’.
Now, select the default user type and terminology, and then click ‘Install’.
After successfully installing the application. Now, click on the created shortcut to access the Ginger homepage.
Your first Project in Ginger
Here, we will perform Web application automation using Ginger, let’s create a solution for the same. A solution in Ginger is a logical structure with complete automation-related files and only one solution can be loaded at a time. However, multiple target applications can be added to the same solution.
Click on ‘Create a new solution‘
- ‘Add Solution’ window
- Enter the solution name
- Browse the location to be stored
- Select the ‘main application platform (‘web’)
- Enter the ‘solution password encryption key’
- Click on the ‘Create’ button
The following diagram depicts the ‘Business Flow,’ which is an end-to-end (start-to-finish) logical flow of the project/business.
So, now the folder structure is automatically created. Once the project solution is created.
Here, multiple target applications can be added to the same solution.
Go to the ‘Configurations’ tab
- Click on ‘add (+)’ button
- Select the desired application from the window displayed
Accordingly, the target applications have been merged into the solution:
Go to the ‘Business Flows’ tab
- Click on the ‘Edit’ tab
- Select the desired application in the solution
Configure the agent
Agents are the platform where the scripts will run. First, you select the driver type where you want to launch the application and click the ‘Agents’ tab.
Now, navigate to the ‘Resources’ tab and create an environment for the desired application. An environment stores application-related data such as login credentials, server connection information, and automation flow. One should use environment variables as much as possible to store any configurations that may change per environment.
Given that you have created a new environment, it will ask whether you want to share it with all or a subgroup of the target applications created under business flow.
Given that you have created a new environment, it will ask whether you want to share it with all or a subgroup of the target applications created under business flow. Therefore, you can also create a new environment by cloning one that already exists.
You can also create a new environment by cloning one that already exists.
Now, click on the environment created
- A list of target applications assigned to this environment is displayed
- Select the desired application and it will open displaying three environment-specific tabs: Parameters, Databases, and Login Users.
Add a new Activity
Basically, you need to navigate to Business Flows and add a new activity. These activities are a collection of actions required to complete a function or intended task.
For example:
The user successfully logged in using valid credentials. Here logging in with valid credentials is a functional activity that can be completed using a set of actions.
Under this activity, multiple actions can be created. You can click on the ‘Automate’ tab in the top right corner of the page and add automation actions from the ‘Action Library’ in the toggle panel. Now on the top bar, the target application configured agent, and environment that you have chosen for the current business flow is displayed.
Essentially, the actions library is divided into four categories: plugin actions, legacy actions, platform actions, and general actions.
In the below image, a ‘Bowser Action’ is added, and double-click it to add a value, i.e. to add various operation settings.
First, go to Expression settings, navigate to the desired folder structure, and enter the URL value, which can be parameterized in the environment.
Now let’s add actions to the activity
We’ve launched the website in the driver; now we’ll locate the elements and log in with the appropriate credentials.
After that Select ‘UI Element Action’ from the Action Library in the toggle panel and provide details about the element to be located.
First of all, I am using orange HRM demo website ( https://opensource-demo.orangehrmlive.com )
So, the element ‘Username’ is located using XPath to perform send keys operation.
The following shows the configuration for locating a button and clicking on it for successful login.
Because the configuration shown in the following figures is used to verify the element that appears on the page is successful login.
Variables – To validate the text retrieved after login, go to the expression editor and add the activity variable.
A variety of variables can be included, such as –
- ‘Variable String’ – To verify a string on the page
- ‘Variable Random Number’ – To verify a number randomly generated every time within a given range
- ‘Variable List’ – To verify a variable from a list specified
- ‘Variable Number’ – To generate a random number between the given minimum and maximum range of number
- ‘Variable Password String’ – To encrypt the entered password
- ‘Variable Sequence’ – To give minimum and maximum range of numbers with a specified interval
- ‘Variable Timer’ – To use as a timer
Similarly, other actions, as shown in the figure below, are added to browse other tabs.
From the ‘Execution Report’ tab, screenshot capture and log details can be enabled.
So here, all the actions of the test scenario are completed, Now click the ‘Run Activity’ button located at the top of the page.
Following is the execution, you can check the output values under ‘Actual Value’ and ‘Expected Value,’ as shown below.
The following image shows the execution in progress
The actual below image shows the execution is completed.
Adding run set
The Run Set is a real-time dashboard with a single complete end-to-end project flow comprised of various activities. It displays the entire Business flow, including actions, activities added and executed, and steps passed, pending, failed, or blocked.
First, you need to Set up the ‘Run Sets’ by adding the desired Business Flow and to start the execution, click on the runner tab button.
Also, you can get a complete execution history:
- Navigate to ‘Run Sets
- Executions History’ tab
Following are the Execution Results shown in the output of the execution.
Execution Report
The following section shows a failed scenario.
- To start, we need to create a new Run Set.
- Then add a new runner set, go to the ‘Run Sets’ tab, and click the ‘+’ button.
Now, Click on the ‘+’ button to add a Business flow to the runner.
After adding the business flow, you can see the number of activities and actions in the run set.
So, to run the run set, click the ‘run button’ shown in the image below.
Now, the execution is seen in progress
Here, the runner display number of failed actions, and clicking on the ‘Generate Run Set Report option’, will create a detailed execution report.
The following shows the execution report of the failed test scenario.
Formation of the Execution Reports displays a detailed execution that includes. The following information is an action name, and action type, So now execution – start, duration, and end time, number of retry iterations, status (passed/failed), Error details, and screenshots.
Therefore, we have completed Web application automation using Ginger successfully. Happy Testing!!
Conclusion: –
Ginger strikes me as a simple and modern automation tool that can be used to create test cases in natural language, making it a valuable platform for continuous testing, regression testing, and progressive testing.
15An SDET with hands-on experience in Functional testing on Web and Mobile applications, System testing, Requirement analysis, Defect reporting, Web, Mobile, and API Test Automation. Practical experience in Python, JavaScript, C#, Selenium, Playwright, SpecFlow, Behave, Pytest, BrowserStack, Appium, Postman, SQL