This blog explains the steps to integrate Selenium Tool with TestLink Test Management tool. Both the tools being open source, they can be integrated to develop an Automated Open Source Test Management solution.
- Mapping Automation test scenarios with Test Cases in TestLink tool.
- Better tracking the Test Executions and Test Results.
- Automate test scheduling, test runs and defect tracking.
- Execute automated test scripts from Selenium tool, view automation results and trace the scripts back to requirements and test cases in TestLink tool for change impact analysis.
Some Background on TestLink Tool and Selenium Tool
Test-link is most widely used web based opensource test management tool. It provides the following features
- Synchronizes requirements specification and test specification together.
- Allows creating project and document test cases.
- Allows creating multiple accounts for different roles and supports Role based access control.
- Supports both automated and manual execution of Test cases.
- Allows generating Test Plan and Test Report in a fraction of the time and supports test reports in various formats like Excel, MS word, and HTML formats.
Selenium (or Selenium WebDriver) is a web automation framework that allows you to execute your tests against different browsers like Firefox, Internet explorer, Google Chrome, etc.
WebDriver also enables you to use different programming language in creating your test scripts. Programming languages supported by WebDriver are Java, .Net, PHP, Python, Perl and Ruby.
Below mentioned are Steps to integrate Selenium Webdriver with TestLink:
Pre-Condition: TestLink tool installed and Selenium WebDriver configured.
Step-1: Enable Automation in TestLink
Automation option need to be enabled in TestLink tool for integrating with Selenium.
To enable this we need to enable API Key option in the tool. To do this:
Go to Project -> Open your project -> Enable “Test Automation” / “API Key”.
Step-2: Generate API Key
Go to My settings -> Click on “Generate a new key”
After this is done, you should be generated with an API key as like below under the Project that you have created in TestLink:
API Key is used to communicate between Selenium WebDriver code and TestLink.
Step-3: Configure TestLink Client API Jar:
Download and include TestLink API Jar file in your project build path library. The following files need to be included
Step-4: Develop code to communicate to TestLink from Selenium:
Below mention is the code snippet:
Step-5: Execute Selenium test and update Test result in TestLink
Once you execute the script, it updates the result for the particular test case in TestLink. The screenshot below shows the TestCase status updated from Selenium.