This unitils module will allow you to push results of automated test results to testlink, an opensource test management software (@see http://testlink.org/ )
to use:
@TestLink(value = "testCaseThree", suite = "TestLinkModuleIntTest")
public void testCaseThree() {
//...
}
Add testlink configuration in unitils-local.properties as following:
#The clean url to your testlink appl: http://www.addresstotestlink.com/testlink
org.unitils.testlink.url=
#When the api is activated this key can be found in the user settings.
org.unitils.testlink.devkey=
org.unitils.testlink.project=
org.unitils.testlink.testPlan=
#name of testlink user to use
org.unitils.testlink.username=
# By specifing the version of the build name like this the version will be that of the pom file. Don't forget to turn on resource filteren on your test resources
org.unitils.testlink.buildName=${project.version}
org.unitils.testlink.testCommentName=testComment
#There are not mandatory
org.unitils.testlink.createTestIfNeeded=True
org.unitils.testlink.createTestPlanIfNeeded=True
org.unitils.testlink.assingTestIfNeeded=True
Finally add @TestLink in your unit testcases (methods) just like this:
@TestLink(value = "testCaseThree", suite = "TestLinkModuleIntTest")
public void testCaseThree() {
After the test is run of the testcases result will be pushed back to testlink
Cookbook Simple example
Step 1: Testlink
To install testlink check http://teamst.org/ . Suppose testlink is situated on "http://localhost/testlink/"
Log into testlink with the user you want to user to do automated tests. Suppose the user is "MonkeyUser"
Find the "Personal API access key" under My Settings. You'll need it later. Suppose it is "4be86209b7373137663a27715ad9a8a6"
Create a testlink project: "My_New_Project"
Create a new Testplan "My_Testplan" in the "My_New_Project"
Config the testlink module to connect to you project, put in unitils.properties . Cnfr. values in Step 1, replace them with the values corresponding to your project
org.unitils.testlink.url= http://localhost/testlink/
org.unitils.testlink.project= My_New_Project
org.unitils.testlink.testPlan= My_Testplan
org.unitils.testlink.buildName=0.0.1 #version of your SUT
org.unitils.testlink.username= MonkeyUser
org.unitils.testlink.devkey= 4be86209b7373137663a27715ad9a8a6
org.unitils.testlink.createTestIfNeeded=true
org.unitils.testlink.assingTestIfNeeded=True
Step 3: write JUnit test and connect it to testlink
Create a test called helloworld, and see a result in testlink under "helloworld" by adding @TestLink("helloworld") on the test
Unitils Testlink Module
This unitils module will allow you to push results of automated test results to testlink, an opensource test management software (@see http://testlink.org/ )
to use:
Testlink Module Load the artifact (maven)
Testlink Module possible config
Please create unitils-local.properties, and add testlink to unitils.modules. Code as following:
Add testlink configuration in unitils-local.properties as following:
Finally add @TestLink in your unit testcases (methods) just like this:
After the test is run of the testcases result will be pushed back to testlink
Cookbook Simple example
Step 1: Testlink
To install testlink check http://teamst.org/ . Suppose testlink is situated on "http://localhost/testlink/"
Log into testlink with the user you want to user to do automated tests. Suppose the user is "MonkeyUser"
Find the "Personal API access key" under My Settings. You'll need it later. Suppose it is "4be86209b7373137663a27715ad9a8a6"
Create a testlink project: "My_New_Project"
Create a new Testplan "My_Testplan" in the "My_New_Project"
Step 2: Config Unitils
Put this inside your .pom file.
create file unitils.properties in src/test/resources
load the testlink module, put in unitils.properties
Config the testlink module to connect to you project, put in unitils.properties . Cnfr. values in Step 1, replace them with the values corresponding to your project
Step 3: write JUnit test and connect it to testlink
Create a test called helloworld, and see a result in testlink under "helloworld" by adding @TestLink("helloworld") on the test
RUN!
The result should now be in testlink. Running the same test over and over again without changing the buildName will overwrite the previous results
Last edit: Thomas De Rycke 2013-09-11