Version 8.0.2 |
In chapter 12 we described how to integrate JUnit tests into a QF-Test test suite, which creates
a common run log combining the results from the unit tests with those from the other QF-Test test cases.
With the help of the Java annotation @QFTest.Test
it is possible to go the opposite way and
include QF-Test test suites into a Junit 5 test case, integrating the results from the QF-Test test run into the
JUnit test results. This simplifies the inclusion of QF-Test test runs into Maven or Gradle builds, as well as
software development environments like Eclipse or IntelliJ IDEA.
To do so, extend the test class, which should include the execution of one or several QF-Test test suites, with a method
annotated with de.qfs.apps.qftest.junit5.QFTest.Test
. The method must return an object of the type
de.qfs.apps.qftest.junit5.QFTest
, which is created using the static method QFTest.runSuite(...)
or QFTest.runSuites(...)
. If required, this object can be further configured e.g. to include QF-Test options or variables.
The provided methods are documented in the file doc/javadoc/qftest-junit5.zip
inside the QF-Test installation.
| ||||
Example 28.3: Example of a JUnit 5 test case including a QF-Test test suite. |
To execute the test it is required to include the following libraries from the QF-Test installation into the classpath:
lib/truezip.jar
qflib/qflib.jar
qflib/qfshared.jar
qflib/qftest.jar
de.qfs.qftest
gradle plugin to
automatically resolve those dependencies. For more information, refer to the plugin homepage.
| ||||
Example 28.4: Excerpt from a gradle.build file, which calls QF-Test during the JUnit test run. |
Last update: 12/4/2024 Copyright © 1999-2024 Quality First Software GmbH |
1. Functional cookies
We use functional cookies to ensure the basic functionality of the website.
2. Performance and statistic cookies
We use Matomo for analyzing and optimizing our website. Cookies permit an anonymous collection of information that help us offering you a clear and user-friendly visit of our web pages.
This cookie contains a unique, pseudonymized visitor ID internal to Matomo for recognizing returning visitors.
This cookie is used to track from which website the anonymized user proceeded to our website.
The Matomo session cookie is used to track the visitor's page requests during the session.
is created and should be then directly deleted (used to check whether the visitor’s browser supports cookies).
short lived cookies used to temporarily store data for the visit.
short lived cookies used to temporarily store data for the visit.