JUnit Jupiter Episode 2 - Unit- and Integration Testing in an Apache Maven Project

Ғылым және технология

The intention is to show how howto run unit- and/or integration
tests within an Apache Maven project. It will be shown how
to configure Maven Surefire/Failsafe plugin and how to bind them
to the Apache Maven Lifecycle. Finally, it will be given an approach
to selectively run unit- or integration tests.
➡️ VIDEO Content ⬅️
00:00 Introduction + overview
00:13 Overview of the example project.
01:43 Project overview on the console.
02:42 How does maven-surefire-plugin know what to run as tests.
03:17 The naming convention for maven-surefire-plugin (unit tests).
04:23 How does the IDE identify tests?
06:11 Creating an integration test.
06:47 Try to execute integration test on the console.
07:02 The Maven life cycle
07:40 The default binding of maven-surefire-plugin goal `test`.
08:15 pre-integration-test, integration-test, post-integration phases.
08:46 Running mvn verify on console.
09:18 Maven failsafe plugin not executed by default.
09:32 Adding the binding for maven-failsafe-plugin.
10:41 Executing with th maven-failsafe-plugin on console.
11:20 Naming conventions for maven-failsafe-plugin.
12:01 Running unit- and integration tests on console.
13:00 Breaking a unit test will fail the build.
14:05 Breaking an integration test will NOT fail the build why?
15:06 The answer to the NOT failing.
16:39 Adding `verify` goal in the pom file.
17:40 Explanations not to run unit- and or integration tests.
18:20 Suppress the running of unit tests.
18:56 Suppressed unit- and integration tests.
19:37 Finer control of executing unit- and or integration tests.
20:56 Suppress the running of unit tests and/or integration tests.
22:52 Suppress even compiling of unit- and integration tests.
25:10 Executing only particular unit tests.
27:04 Executing test method of a test class.
28:20 Executing only particular integration tests.
29:27 Selecting unit- and or integration tests based regular expression / globs.
30:37 End of video with final music. Bye.
* Example project: github.com/khmarbaise/youtube...
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
→·References·←
➡️ Apache Maven Project: maven.apache.org
➡️ Apache Maven Plugins: maven.apache.org/plugins
➡️ Apache Maven binding: maven.apache.org/ref/current/...
➡️ Apache Maven Build Lifecycle: maven.apache.org/guides/intro...
➡️ Maven Surefire Plugin: maven.apache.org/surefire/mav...
➡️ Maven Failsafe Plugin: maven.apache.org/surefire/mav...
➡️ Maven Central Search: search.maven.org
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
→·SOCIAL MEDIA·←
➡️ Web Site: soebes.io
➡️ Blog: blog.soebes.de
➡️ Twitter: / khmarbaise
➡️ Mastodon: mastodon.social/web/@khmarbaise
➡️ LinkedIn: / karl-heinz-marbaise-17...
➡️ Xing: www.xing.com/profile/KarlHein...
For business contacts only: 📫 ytbusiness@soebes.de
➡️ Imprint/Impressum: soebes.io/impressum/
🎤🎸 Music composed and arranged by: Günter Bardischewski

Пікірлер

    Келесі