This plug-in integrates Jenkins and TestLink and generates reports on automated test execution. With this plug-in you can manage your tests in TestLink, schedule and control in Jenkins, and execute using your favorite test execution tool (TestPartner, Selenium, TestNG, Perl modules, PHPUnit, among others).
This plug-in is not part of TestLink project, issues regarding Jenkins and TestLink integration must be reported in Jenkins JIRA. It has been reported by users that it is also possible to use ReportNG, as this tool has an option to output TestNG XML too.
When filing an issue, remember to include as much data as possible, but avoid including sensitive data, as attachments can take a while to be deleted from JIRA, as the process is manual and quite troublesome
Jenkins TestLink Plug-in Tutorial
Check out this tutorial with step-by-step instructions on how to integrate Jenkins and TestLink using TestLink Plug-in.
- Jenkins TestLink Plug-in Tutorial (HTML)
- Jenkins TestLink Plug-in Tutorial (PDF)
- Jenkins TestLink Plug-in Tutorial (HTML) (German)
- Jenkins TestLink Plug-in Tutorial (HTML) (French)
- Jenkins TestLink Plug-in Tutorial (HTML) (Spanish)
- Jenkins TestLink Plug-in Tutorial (HTML) (Brazilian Portuguese)
The TestLink plug-in integrates Jenkins with TestLink. TestLink plug-in uses testlink-java-api to access TestLink XML-RPC API. With the information that you provide in the build step configuration the plug-in retrieves automated tests from TestLink. With the plug-in, you are able to execute build steps that call testing tools. It reads TestNG, JUnit and TAP test report formats, used to update TestLink test cases' executions.
The job configuration changed! Now there are three sections, what helps you to configure your job, and add extra build steps, result seeking strategies and general information about TestLink.
TestLink configuration section
Test Execution section
And Result Seeking Strategy section
You can use environment variables in Test project name, Test plan name or Build name. For instance, build-project-$BUILD_NUMBER would be replaced by build-project- and the number of the Build executed in Jenkins.
How does the plug-in execute my automated tests?
TestLink Plug-in retrieves automated test cases data from TestLink. This data is then set as environment variables. This way your build steps can make use of this information to execute your automated tests.
For instance, you could run ant passing a Test Class as parameter, more or less something like this, /opt/java/apache-ant-1.8.0/bin/ant -DtestClass=$TESTLINK_TESTCASE_TEST_CLASS. In this case, Test Case is the name of a custom field in TestLink.
List of environment variables available during TestLink Plug-in execution of single build steps (JENKINS-17622):
List of environment variables available during TestLink Plug-in execution of iterative build steps:
For each Custom Field found, TestLink Plug-in defines an environment variable for with its name and value, as shown above (%CUSTOM_FIELD_NAME%). If the custom field name contains spaces the plug-in will convert them into _'s. i.e., Test Class can be accessed as %TESTLINK_TESTCASE_TEST_CLASS% in Windows or $TESTLINK_TESTCASE_TEST_CLASS in *nix-like systems.
For each test case, the plug-in executes one call for each custom field. In other words, if you have 1000 tests in a test plan, the plug-in will execute a lot of calls to TestLink, downgrading the execution of your job.
How does the plug-in know if a test passed or failed?
You can choose among different result seeking strategies in your job configuration. The plug-in supports three result formats, TestNG, JUnit and TAP.
TestNG result seeking strategies
TestNG class name: The plug-in matches the TestNG class name (e.g.: org.tap4j.TestParser) and the key custom field value.
TestNG method name: The plug-in matches the TestNG method name (e.g.: org.tap4j.TestParser#testTokenizer) and the key custom field value.
TestNG suite name: The plug-in matches the TestNG suite name (e.g.: functional tests) and the key custom field value.
JUnit result seeking strategies
JUnit case class name: The plug-in matches the JUnit case class name (e.g.: org.tap4j.TestParser) and the key custom field value.
JUnit case name: The plug-in matches the JUnit case class name (e.g.: testTokenizer) and the key custom field value.
JUnit method name: The plug-in matches the JUnit case class name (e.g.: org.tap4j.TestParser#testTokenizer) and the key custom field value.
JUnit suite name: The plug-in matches the JUnit suite name (e.g.:functional tests) and the key custom field value.
TAP result seeking strategies
TAP file name: The plug-in matches the TAP file name (e.g.: testFtpProtocol.tap) and the key custom field value.
TAP file name multiple test points: Adds one test execution in TestLink for each TAP Test Result with its execution status
- Download and install the latest version of TestLink (http://testlink.org/).
- Create automated tests in TestLink with Custom Field for automation.
- Install the TestLink plug-in from the Jenkins Plugin Manager
- Define a TestLink configuration from the Configure System page.
- Add a Invoke TestLink build step in the job you want execute automated tests.
- Configure the required properties.
- English (American)
- Portuguese (Brazil)
- Spanish (Thanks to César Fernandes de Almeida)
- French (Thanks to Floréal Toumikian, Olivier Renault, Latifa Elkarama)
Want to see this plug-in in your language? Send us an e-mail and we will get in touch with the text that needs to be translated.
The plug-in 1.0 and 1.1 versions were pilot projects that should be ignored. They have issues in distributed environments and depend on Maven. Please, consider updating your plug-in to the 2.0 version.
We don't maintain the plug-in for Hudson. Issues happening in Hudson may not be fixed here.
|TestLink||1.9.0||1.9.0||1.9.0||1.9.0||1.9.0||1.9.0||1.9.0||1.9.2||1.9.3||1.9.3||1.9.3||1.9.4 and 1.9.5||1.9.6||1.9.6||1.9.6||1.9.7||1.9.7||1.9.8||1.9.8||1.9.8+||1.9.14+|
- 3.7 is broken with 1.9.8 due to a backward incompatibility in TestLink XML-RPC API, please use 3.8 or higher
- Enabling SSL for Jenkins TestLink plugin in Tomcat
- Google Test + TAP Listener + Jenkins TestLink Plug-in
- Article published in Testing Experience magazine issue number 12 (Open Source Tools) written by Bruno P. Kinoshita and Anderson dos Santos. 2010.
- Slides used in the lighting talk presented at Encontro Ágil 2010 in IME-USP (Portuguese Only). 2010.
- Article published in Automated Software Testing Magazine, volume 3, issue 1. March, 2011.
- Slides used in the presentation done in Belgium Testing Days 2011.
- Lighting talk for Encontro Ágil 2010, at IME-USP.
- More articles and tips on Bruno P. Kinoshita's website.
- Sponsor company (until May 2011): Sysmap Solutions - Brazil.
- Sponsor company: TupiLabs - Brazil
- Presentation at STPCon Spring March 2012 in New Orleans - USA.
- A collection of links about jenkins-testlink plugin by http://forza.cocolog-nifty.com (Japanese/日本語)
For commercial support, please get contact us via @tupilabs
Release 3.16 (2019-02-07)
- JENKINS-48488 - Request to make Testcase version available in Jenkins Build environment
Release 3.15 (2018-12-29)
- Updated testlink-java-api to 1.9.17-0
- Updated Jenkins parent in pom.xml
- Updated dependencies (lang, io, codec)
- Set project Java to 8
- Tested with TestLink 1.9.17 (basic workflow, with a TAP file name strategy)
Release 3.14 (2018-03-28)
- JENKINS-50445 - Add tap4j model objects to the whitelist for serialization to make TAP reporting compatible with Jenkins 2.102+
- JENKINS-49302 - Fix escaping of summary reports (regression in 3.13)
- PR #31 - Fix issues in French localization
Release 3.13 (2017--)
- Pull request #26: make the testcase external ID visible as an environment variable in a Jenkins shell thanks @johnwalker247!
- Pull request #22: Updateparser to version 0.5 with code fixes thanks @yasassri
- Fix security issue
Release 3.12 (2016-04-17)
- Upgraded tap4j(http://tap4j.org)
- Upgraded testlink-java-api(https://github.com/kinow/testlink-java-api)
- Pull request #20: Plan and build custom fields support thanks @maiksaray!
Release 3.11 (2015-11-14)
- TAP test plans support "n..m" with n>1
- Added build number and error message in notes of JUnit Test Result
- Update TestLinkSite.java
- JENKINS-20014: Jenkins Testlink plugin reports "Found 0 automated test cases in TestLink."
- Reverted JENKINS-17567: Allow the plug-in to filter test cases by last execution status due to a backward incompatibility in TestLink 1.9.8 XML-RPC API
- Updated tap4j to 4.0.4
- Merged pull request https://github.com/jenkinsci/testlink-plugin/pull/8 that adds platforms to the job config
- JENKINS-17801: TAP-attachments produce file not found error
- JENKINS-15790: Name of Test Case is null
- JENKINS-19209: Testlink Plugin Not Run Test should mark build as failed
- JENKINS-19390: Testlink Plugin did not manage to get 2nd execution status
- Updated testlink-java-api to 1.9.7-0
- JENKINS-17622: Cannot access TestLink environment variables within Jenkins build
- JENKINS-16640: Mark in Jenkins build with "NOT RUN" Test Cases and display in the UI (with colours, etc)
- JENKINS-17567: Allow the plug-in to filter test cases by last execution status
- JENKINS-13821: When test uses DataProvider it mark in TestLink only by last result
- JENKINS-17642: Trouble finding test results using TAP result seeking strategy
- Quick profiling with Yourkit. Nothing worth of refactoring was found. Thanks to Yourkit for providing an Open Source license to us.
- Jenkins-17442: When connectin to TestLink find error ClassCastException (due to a bug in TL XML-RPC API, the plug-in wasn't working with TestLink 1.9.6)
- Jenkins-16118: Testlink Plug-In: get Custom field information for Testplans and Testprojects
- Jenkins-17023: Jenkins Testlink plugin Found 0 test result is show while test is runned
- Jenkins-15588: TestLink is not getting Updated
- Jenkins-17147: The configuration for testng method name and data provider is not saved
- Updated Jenkins version to 1.466
- The plug-in now should work correctly with other plug-ins that require a BuildStepDescriptor, as Conditional Build Step
- JENKINS-15486: Documentation is needed for Project GTest Sample Tap&Testlink for C++ testing
- JENKINS-15343: Unable to use Conditional BuildStep Plugin with Testlink Plugin
JENKINS-10904 - Include test step information as env vars. We had to update testlink-java-api, as the bug was in there. However, the TestLink data stored in builds will be lost. So if you need any of the data, back it up before updating the plug-in.
Added test summary. This way the user can see more details in TestLink reports.
Fixing bugs in JUnit and TestNG strategies
- Created Result Seeking Strategy extension point
- Fixed all blocker issues
- Added more result seeking strategies (TestNG method name, for example)
- Added new contributors to the project
- Code reviewed and refactored several parts of the code, it's way cleaner now
- Added configuration to make optional attachments upload
Minor improvements for issues found during update of Jenkins TestLink Plug-in Tutorial
JENKINS-11264 - Test execution notes being added twice and incorrectly formatted
- JENKINS-10623 - Organize and update French, Spanish and Brazilian Portuguese translation and documentation
- JENKINS-9054 - Add support to platforms in TestLink plug-in
- JENKINS-10809 - Add a way to call other build steps in test execution for the plug-in (Yay for DRY!)
- JENKINS-10849 - OutOfMemoryError using TestLink plugin (Thanks to YourKit!)
- JENKINS-9811 Add a POST <Single test command>-field, to execute a process after the plug-in iterates the retrieved automated test cases
- JENKINS-9672 Test link custom field parser split the String value by semicolon or comma.
- JENKINS-9993 Add root element for JUnit test results
- FIXED-9444 - Add environment variables to single test command (actually, I used some code from Jenkins core to execute both commands now :-)
- French translation
- Small issue with non-existent option Debug in Job configuration
- FIXED-9229 - JUnit wrong status
- Portuguese i18n messages typo
- JUnit BUG fix
- Enhancement of the Build logs
- Migration from Hudson to Jenkins
- Test transaction property.
- i18n (version 1.0 supports only English).
- Add single test command feature (it will enable running test suites)
- Fixed Java class headers
- JFreechart graphics betterment
- Fixed BUG JENKINS-8636 TestLink Plugin FATAL: Error creating test project
- Fixed BUG JENKINS-8531 Unexprssive error message
- Fixed BUG 8292 (java.lang.NullPointerException at hudson.plugins.testlink.updater.TestLinkTestStatusUpdater.updateTestCases(TestLinkTestStatusUpdater.java:55)
- Settings automated tests properties as environment variables.
- Switch from dbfacade-testlink-java-api to testlink-java-api http://sourceforge.net/projects/testlinkjavaapi/.
- JUnit parser.
- TestNG parser.
- TAP parser using tap4j http://sourceforge.net/projects/tap4j/.
- Execute Test Suites.
- Let the user define the custom fields name.
- Implement feature that lets user to use the latest revision from a SVN repository as Build name.
- First version of the plug-in (the development was guided based on the source code of the following plug-ins: CCM , Sonar (how to ref maven installations)).
- Keep compatibility with latest versions of Jenkins and TestLink.
- Add test case steps (JENKINS-10904)
Open source licenses donated for this project
YourKit is kindly supporting open source projects with its full-featured Java Profiler.
YourKit, LLC is the creator of innovative and intelligent tools for profiling
Java and .NET applications. Take a look at YourKit's leading software products:
YourKit Java Profiler and
YourKit .NET Profiler.