Chapter 7. Result Seeking Strategies

Table of Contents

JUnit
JUnit case name
JUnit class name
JUnit method name
JUnit suite name
TestNG
TestNG class name
TestNG method name
TestNG suite name
TAP - Test Anything Protocol
TAP file name

After your automated tests are executed the plug-in has to look for Test Results. This way it will know whether an automated test was executed correctly or not and then it can update the test execution status in TestLink.

Jenkins TestLink Plug-in supports three different formats of results: JUnit, TestNG and TAP.

JUnit

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite failures="1" time="0.078" errors="0" skipped="0" tests="1" name="A Suite">
  <testcase time="0" classname="tcA" name="testVoid">
    <failure type="junit.framework.AssertionFailedError" message="null">junit....</failure>
  </testcase>
  <testcase time="0" classname="tcB" name="testVoid" />
  <testcase time="0" classname="tcC" name="testVoid" />
  <testcase time="0" name="nameA" />
  <testcase time="0" name="nameB" />
</testsuite>
            

JUnit case name

This strategy matches the case name with the key custom field value.

JUnit class name

This strategy matches the case class name with the key custom field value.

JUnit method name

This strategy matches <package>.<classname>#<methodname> with the key custom field value (e.g.: com.example.MyClass#testSomething)

JUnit suite name

This strategy matches the suite name with the key custom field value.