Dependency Injection Without a Framework
Dependency injection in Java: constructor injection by hand, why DI matters, the Service Locator anti-pattern, and a brief intro to Spring, Guice, and OSGi.
Dependency injection in Java: constructor injection by hand, why DI matters, the Service Locator anti-pattern, and a brief intro to Spring, Guice, and OSGi.
Playwright setup, writing your first test, page navigation, clicks, form fills, selectors, headless execution, traces and screenshots on failure, and CI integration.
What makes a test an integration test, testing database interactions, testing HTTP endpoints with Supertest and MockMvc, and Docker-based testing with Testcontainers.
Why testing matters, the testing pyramid, cost of bugs, coverage as a metric, and a tooling overview for JavaScript/TypeScript and Java projects.
Mockito setup, @Mock and @InjectMocks, when().thenReturn(), verify(), ArgumentCaptor, mocking exceptions, and spy objects.
jest.fn(), jest.spyOn(), jest.mock() for modules, clearing and resetting mocks, mocking fetch and axios, and testing async code.
End-to-end exercise — build and test a small TypeScript utility library with Vitest (unit and integration tests), full coverage report, and GitHub Actions CI.
React Testing Library setup, render/screen/fireEvent/userEvent, querying by role and text, testing forms, and testing components that fetch async data.
Jest snapshot testing pros and cons, updating snapshots, when to use them, and an introduction to Storybook for visual component testing.
Coverage metrics (line, branch, function), configuring Istanbul and JaCoCo, setting thresholds, what good coverage means, and collecting coverage in CI.
The red-green-refactor cycle, when TDD makes sense, a worked example building a shopping cart in both TypeScript and Java, and common TDD pitfalls.
Testing an AEM project normally combines three layers: unit tests against Sling Models and
Write your first Java tests -- JUnit 5 setup, assertions, test structure, parameterized tests, and testing the Task Manager and REST API.
Unit testing services and controllers, integration testing API endpoints, and end-to-end testing strategies for Strapi 5.
Strapi testing: setting up a test instance, unit testing services, integration testing controllers and APIs, mocking the Document Service, and CI/CD integration.
Java testing guide: JUnit 5, Mockito mocking, AssertJ fluent assertions, parameterised tests, test patterns, and what to mock vs what not to mock.
JUnit 5 setup with Maven and Gradle, @Test, lifecycle annotations, Assertions, @DisplayName, @Nested, and parameterised tests.
Setting up Jest and Vitest, writing describe/it/test blocks, using expect matchers, lifecycle hooks, and running your test suite.