
briefly introduce the course agenda
Quality Engineering Process some time we will called as Quality Management, it is a process that contains evaluate,assesses and improve the quality of software, totally speak, Quality Management contains three big stage,that are Quality Plan,Quality Assurance, post-QA.
Explore the transition from junit 3 to junit 4, configure maven dependencies, and apply annotations such as @Before, @After, @BeforeClass, @AfterClass, @Test, @Ignore, and suites.
Learn to use the JUnit 4 theories runner with @DataPoints and @Theory to supply parameters, run tests across multiple data points, and distinguish it from parameterized tests.
Explains the limitations of the JUnit 4 runner since 4.7, showing why multiple runners cannot appear in one class, and introduces JUnit rules like the MockitoRule with @Mock.
Evaluate JUnit 4 limitations against JUnit 5 modular architecture, highlighting flexible plugin design, decoupled test discovery and execution, and cross-compatibility with old tests and runners.
Set up JUnit 5 with Maven, use the Jupiter API to assert a collection contains elements, and run tests with Maven and the Surefire plugin.
Build a custom JUnit 5 platform launcher, define the launch discovery request, and use a service loader to load the Jupiter test engine for discovery and execution.
Explore how JUnit 5's assertTimeout and assertTimeoutPreemptively manage timeouts, using @Timeout to avoid blocking and an executor service with futures for preemptive timing.
Learn to conditionally execute tests in Jupiter using assumption checks with the Assumptions utils, reading env from the system and defaulting when missing.
Explore organizing tests in JUnit 5 Jupiter using the @Nested inner class to group related test cases, including basic and exception assertions, with display names and multi-level nesting.
Learn tagging and filtering in JUnit 5 under JDK 16 by using @Tags and @Tag to run subsets like dev, sit, or uat, with pom configuration and tag inheritance.
Explore the junit 5 Jupiter test instance lifecycle and its callbacks. Learn how @BeforeAll, @BeforeEach, @AfterEach, @AfterAll, TestInfo, and @ExtendWith shape setup and teardown.
Discover how JUnit 5 enables test methods and lifecycle methods in interface default methods, leveraging Java 8 features, with a practical interface demonstration and running tests in IDEA.
Integrate hamcrest matchers with JUnit 5 Jupiter by adding the hamcrest dependency and using assertThat with matchers such as anyOf, equalTo, and contains.
Explore JUnit 5 dependency injection using parameter resolvers, including TestInfo, RepetitionInfo, and TestReporter, and learn about dynamic tests, test templates, and parameterized tests.
Implement a custom parameter resolver that supplies random data for tests via a data provider annotation, extending Jupiter with an extension context and thread-local randomness.
Explore JUnit 5 dynamic tests with @TestFactory, generating runtime tests from remote data streams, contrasting static testing, and validating integers greater than zero in a simple service.
Learn how @TestFactory creates dynamic tests with Stream, collection, iterable, iterator, and arrays, with display names, and dynamic containers form a tree with lifecycle rules not applying to dynamic tests.
Explore the junit 5 jupiter test template feature with @TestTemplate, implement a custom TestTemplateInvocationContextProvider, and run a test twice using a HelloWorld annotation.
Demonstrates JUnit 5 parameterized tests with value source and enum source, showing how to inject data into tests, configure dependencies, and run nested demonstrations with strings, ints, and enums.
Explore parameterized testing in JUnit 5 with enum sources, CSV value sources and CSV file sources, and learn to use method sources and data providers to supply diverse arguments.
Learn argument aggregation in JUnit 5 parameterized tests by using the arguments accessor and custom aggregators to convert CSV data into maps or objects.
this lecture demonstrates using JUnit 5 parameterized tests with ArgumentsSource and a custom ArgumentsProvider, plus implicit and explicit data type conversions and display name customization.
Explore enabling and configuring parallel test execution in junit platform (jupiter) using junit-platform.properties, including the same_thread model and class versus method level behavior for faster test runs.
Learn to run tests in parallel or sequentially with JUnit 5 using @Execution and @ResourceLock, configure global or class-level behavior, and manage shared resources safely.
Introduce the Jupiter API into a JUnit 4 project, configure the JUnit platform runner, and demonstrate writing Jupiter-enabled tests with annotations like @DisplayName, @Tag, and @Repeated.
Learn how to migrate legacy JUnit 4 tests to the Jupiter platform using the vintage engine, by updating pom and Maven plugin configurations for transparent execution.
Explore how to migrate JUnit 4 built-in rules to the JUnit 5 Jupiter platform using the JUnit Jupiter migration support component and EnableRuleMigrationSupport.
Discover how to integrate Mockito with JUnit 5 by using the Mockito extension, create mocks with @Mock, stub with when, and verify with assertAll in a restful api unit test.
Learn how Jupiter integrates with Mockito-2 to support parameter dependency injection, passing mock objects, and using @Mock, @Spy, and @InjectMocks in unit tests.
Explore how to integrate Powermock with JUnit 5 through Jupiter vintage to test static and non-static methods using Mockito, with pom dependencies and prepareForTest setup.
Explore the step-by-step integration of JUnit 5 Jupiter with cucumber, including writing step definitions in Java 8, using cucumber expressions, and generating reports with pretty, json, xml, and html reporters.
Integrate JUnit 5 Jupiter with Spring Boot by configuring a Maven module, adding boot dependencies and plugins, and exposing a /phone/brand endpoint through a simple REST controller and service.
Learn how to integrate JUnit 5 with Spring Boot to test a REST endpoint via MockMvc, validate application context loads, and use @MockBean to alter service behavior with jsonpath assertions.
****Please enable the vedio cc(captions) function ****
The course covers the basics of Junit 5, advanced usage, and integration with other testing great tools in detail.
1. JUnit 5 Jupiter Introduction
1.1 Quality Engineering Process
1.1.1 Quality Planning
1.1.2 Quality Assurance
1.1.3 Post-Quality Assurance
1.2 Why Unit Testing?
1.3 JUnit Framework Retrospect
1.3.1 JUnit 3
1.3.1.1 Standard Test Case & Lifecycle
1.3.1.2 TestSuite
1.3.2 JUnit 4
1.4.2.1 Standard Test Case & Lifecycle
1.4.2.2 @RunWith & Runner
Parameterized
Theories
MockitoJUnitRunner
1.4.2.3 @Rule
1.3.3 JUnit 5 Jupiter
1.3.3.1 JUnit 3&4 defect
1.3.3.2 JUnit 5 inception
1.3.3.3 JUnit 5 architecture
1.2.4 JUnit 5 Jupiter Quick Start
Junit 5 Jupiter
Junit 5 TestEngine
Junit 5 Platform Luancher
2. JUnit 5 Juipter Basic
2.1 Jupiter Assertion Statement
2.2 Exception Assertion
2.3 Batch all Assertion
2.4 DisplayName
2.5 Disabled
2.6 Timeout Assertion
2.7 RepeatTest
2.8 Order
2.9 Tagging & Filtering
2.10 Nested Test Classes
2.11 Test Instance Lifecycle
2.12 Jupiter Extensions
2.12.1 TestInstancePostProcessor
2.12.2 BeforeAllCallback
2.12.3 BeforeEachCallback
2.12.4 BeforeTestExecutionCallback
2.12.5 TestExecutionExceptionHandler
2.12.6 AfterTestExecutionCallback
2.12.7 AfterEachCallback
2.12.8 AfterAllCallback
2.13 Assumptions
2.14 Integration Other Assertion framework
2.14.1 Hamcrest
2.14.2 AssertJ
2.15 Condition Execution
2.15.1 DisabledCondition
2.15.2 DisabledOnJreCondition
2.15.3 EnabledOnJreCondition
2.15.4 EnabledOnOsCondition
2.15.5 EnabledForJreRangeCondition
2.15.6 DisabledForJreRangeCondition
2.15.7 DisabledOnOsCondition
2.15.8 DisabledIfEnvironmentVariableCondition
2.15.9 DisabledIfSystemPropertyCondition
2.15.10 EnabledIfSystemPropertyCondition
2.15.11 EnabledIfEnvironmentVariableCondition
2.15.12 EnabledIfCondition
2.15.13 DisabledIfCondition
2.15.14 Custom Condition Execution
2.16 Test case in Interface
3. JUnit 5 Juipter Advanced
3.1 Dependency injection(build-in)
3.1.1 TestInfoParameterResolver
3.1.2 RepetitionInfoParameterResolver
3.1.3 TestReporterParameterResolver
3.1.4 Custom ParameterResolver
3.2 Dynamic Tests-TestFactory
3.3 DynamicContainer
3.4 Test Sources
3.5 Test Templates
3.6 Parameterized tests
3.7.1 ValueSource
3.7.2 EnumSource
3.7.3 MethodSource
3.7.4 CsvSource
3.7.5 CsvFileSource
3.7.6 ArgumentsSource
3.7.7 Argument conversion
3.7.7.1 Implicit conversion
3.7.7.2 Explicit conversion
3.7.8 Custom Display Names
3.7 Parallel Execution
4. Migrate legacy JUnit 4 test code
4.1 Jupiter tests in JUnit 4
4.2 Migration from JUnit 4 to JUnit 5
4.2.1 Junit4 vs Junit5
4.2.2 Run Junit 4 at Junit 5 platform
4.2.3 Junit 4 @Rule at Junit 5 platform
5. Integration
5.1 Mockito
5.2 Powermock
5.3 Selenium
5.4 Cucumber
5.5 Spring Boot