Integrating Selenium Web Automation Framework with TestLink test management tool makes it possible to update test case statuses remotely.
TestLink is the most widely used web-based open source test management tool. With TestLink, it is possible to synchronize requirement specifications and test specifications together. Additionally, through its role-based access control, TestLink supports creation of multiple accounts for different roles.
The link below features an excellent guide to integrating Selenium Web Automation Framework with TestLink, Test Management Tool for updating test case status automatically.
Here are the steps suggested.
Selenium Web Automation Framework is written specifically for test cases which are written in TestLink, meaning that integration of this automation framework with TestLink enables manual as well as automated execution of test cases within TestLink. This allows generation of test plans and test reports in a fraction of the time that the process would otherwise require, and supports test reports in various formats like MS Excel, MS Word, and HTML.
Step 1: Install TestLink on local or cloud environment
- Visit the below URL
- Unzip and install TestLink
Step 2: Enable Automation in TestLink
On the TestLink HomePage, go to My Settings>Account Settings>API Interface Section, and Click on “Generate a new key”
Once this is done, you should have an API Key generated under the Project that you have created in TestLink.
Preparing Automation Environment in TestLink
Enable automated testing for the project
Edit the configuration file in TestLink as follows:
- Add the below two lines in file custom_config.inc.php.example file
- $tlCfg-> api-> enabled
- $tlCfg-> exec_cfg-> enable_test_automation
Rename custom_config.inc.php.example as custom_config.inc.php
Restart Apache server after updating the file.
Configure the TestLink Client API Jar:
Add the above listed JARs as external JARs from the Java Build path.
Develop code to communicate with TestLink from Selenium
Set up DEV_KEY & TESTLINK_URL as follows:
- Replace the DEV_KEY field with your TestLink API Key.
- Replace the TESTLINK_URL with your TestLink URL.
Set up a test case (and make a note that it was created on TestLink):
- TestLink API Key
- TestLink URL
- Test project name
- Test plan name
- Test case name and
- Build name
These details need to be used in Java code, as seen below:
Create a Java class to specify the TestLink integration details and the method to update the test results on Testlink.
Execute Selenium test and update Test result in TestLink. Once you execute the script, the result for the particular test case is updated and automatically reflects on TestLink.
Find sample source code here