Version 8.0.1 |
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: 9/10/2024 Copyright © 1999-2024 Quality First Software GmbH |
1. Cookies fonctionnels
Nous utilisons des cookies fonctionnels pour garantir la fonctionnalité de base du site web.
2. Cookies de performance et de statistique
Nous utilisons Matomo pour analyser et améliorer notre site web. Des cookies permettent une collection anonyme des informations qui nous aident à vous offrir un visite clair et facile à utiliser de nos pages web.
This cookie contains a unique, pseudonymized visitor ID internal to Matomo for recognizing repeat visitors.
This cookie is used to track from which website the anonymized user proceeded to any page or sub-page.
The Matomo session cookie is used to track the visitor's page requests during the session. The cookie is automatically deleted at the end of each session (website visit), at the latest after one day.
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.