TestLink
Introduction
The current integration of QF-Test with the open-source tool TestLink consists of two parts:
- Generating template test suites for QF-Test from the planned test cases of TestLink.
- Importing QF-Test results into TestLink.
3.5.1+If you use TestLink 1.9.4 or newer you can use the TestLink API for interacting with TestLink. The TestLink API requires a valid development key. Therefore open TestLink and go to 'My Settings'. In the settings you can generate a development key by pressing 'Generate key' under the 'API interface' section.
For TestLink 1.9.3 or older versions the integration mechanism accesses the database of TestLink directly. This approach requires a JDBC database driver to use the provided scripts. You can download those drivers from the web page of their providers.
Exporting the planned test cases including its test steps from TestLink to QF-Test supports the test-creator to implement the test cases exactly as planned.
Importing the test results into TestLink provides a better overview over all executed manual and automated tests-cases in one tool.
Note
Test results can also be uploaded to TestLink without exporting
them before. Therefore you have to take care, that the ID of the
test case from TestLink is part of the test case's name in QF-Test. The
name has to be called like this: <TestLink-ID>: Name of
the test case
.
Generating template test suites for QF-Test from test cases
QF-Test offers the capability to generate template test suites following the same structure as the planned tests in TestLink to guarantee a synchronized structure of automated tests and test planning.
In the QF-Test file you can find one Test case node per test case and one Test set node per suite from TestLink. If you have specified the fields "Steps" and "Expected Results" of a test case, the generating-script will also create an empty Test step for each test step in the according test case. The expected result will be shown in the Comment attribute of the Test step node.
Now the template test suite has to be filled by the test automation engineer with the according steps by adding QF-Test steps to the generated Test step nodes.
3.5.1+In case you use TestLink 1.9.4 or newer you need to perform following steps:
- Take care that test automation is enabled in TestLink. Therefore
set the respective
enable_test_automation
key toENABLED
in the configuration fileconfig.inc.php
. - Copy the folder
qftest-9.0.0/ext/testlink/api
to a project-specific location. - Open the launcher script you want to use with a text editor.
The launcher scripts are
exportTests.bat
for Windows andexportTests.sh
for Linux. - Adapt the paths of the variables
JAVA
,QFTDIR
andTESTLINKINTEGRATOR
. - Open the file
TestLinkUserSpecifics.py
with a text editor. - Adjust the variables
serverurl
anddevkey
. - If you want to export custom fields from TestLink, also adjust
the variable
custom_fields
. - Run the adapted export script, like shown below.
exportTests.bat --testproject projectname --targetsuite /path/to/testsuite.qft
If you use TestLink 1.9.3 or older, please perform those steps:
- Copy the folder
qftest-9.0.0/ext/testlink/export
to a project-specific location. - Open the launcher script you want to use with a text editor.
The launcher scripts are
exportTestLinkToQFT.bat
for Windows andexportTestLinkToQFT.sh
for Linux. - Adapt the paths of the variables
JAVA
,QFTDIR
andTESTLINKINTEGRATOR
. - Open the file
TestLinkDBIntegrator.py
with a text editor. - Adjust the variables
dbdriver
,conncetionstr
,dbuser
anddbpass
according to your database connection. - If you want to export custom fields from TestLink, also adjust
the variable
custom_fields
. - Run the adapted export script, like shown below.
exportTestLinkToQFT.bat --testproject projectname --targetsuite /path/to/testsuite.qft
Execution of test cases
Executing the QF-Test tests can be performed as usual. But you should create a XML-report at the end of the test run, because the import mechanism is using this report. Therefore you have to use the '-report.xml' parameter during test execution. If you create the reports via the GUI, you have to check the checkbox 'Create XML report'.
Note
In case you did not export test cases from TestLink the ID of the
test case from TestLink has to be part of the test case's name in QF-Test. The
name has to be called like this: <TestLink-ID>: Name of
the test case
.
qftest -batch -report.xml reportFolder testsuite.qft
Importing QF-Test results into TestLink
After creating the XML report file, you can upload the results to TestLink.
Per default the import mechanism creates a new build for every test run. The build number of TestLink will be created by the run-ID of the QF-Test report. You can change the run-ID, by setting the parameter '-runid' when launching the tests with QF-Test. But you can also set the '-build' parameter during import to specify a custom build name.
3.5.1+In case you use TestLink 1.9.4 or newer you need to perform following steps:
- Take care that test automation is enabled in TestLink. Therefore
set the respective
enable_test_automation
key toENABLED
in the configuration fileconfig.inc.php
. - Copy the folder
qftest-9.0.0/ext/testlink/api
to a project-specific location. (If you have copied them already for exporting you can use the same files.) - Open the launcher script you want to use with a text editor.
The launcher scripts are
importResults.bat
for Windows andimportResults.sh
for Linux. - Adapt the paths of the variables
JAVA
,QFTDIR
andTESTLINKINTEGRATOR
. - Open the file
TestLinkUserSpecifics.py
with a text editor. - Adjust the variables
serverurl
anddevkey
. (If you have adapted them already for exporting you can use the same values.) - Run the adapted import script, like shown below.
importResults.bat --testproject projectname --resultfile qftestReport.xml --testplan testplanname --platform system1
If you want to overwrite the build name you can use the '-build' parameter.>
importResults.bat --testproject projectname --resultfile qftestReport.xml --testplan testplanname --platform system1 --build myBuild
If you use TestLink 1.9.3 or an older version, please perform following steps:
- Copy the folder
qftest-9.0.0/ext/testlink/import
to a project-specific location. - Open the launcher script you want to use with a text editor.
The launcher scripts are
importToTestLink.bat
for Windows andimportToTestLink.sh
for Linux. - Adapt the paths of the variables
JAVA
,QFTDIR
andTESTLINKINTEGRATOR
. - Open the file
ReportParser.py
with a text editor. - Adjust the variables
dbdriver
,conncetionstr
,dbuser
anddbpass
according to your database connection. - If you want to export custom fields from TestLink, also adjust
the variable
custom_fields
. - Run the adapted import script, like shown below.
importToTestLink.bat --testproject projectname --resultfile qftestReport.xml --testplan testplanname --tester tester