SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

JUNIT / NOTES</>↗
JUnit12 Jul 2026

How do I run only selected JUnit tests by tag?

To run only selected JUnit 5 tests by tag, mark your tests with @Tag, then configure your build tool or IDE to include only that tag. 1. Add tags to your tests import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; class PaymentServiceTest { @Test @Tag("fast") void calculatesTotal() { // test code } @Test @Tag("integration") void connectsToPaymentGateway() { // test […]

Wayan · 2 min read
JUNIT / NOTES</>↗
JUnit12 Jul 2026

How do I use tags to group JUnit tests?

In JUnit 5, you can use the @Tag annotation to group tests into categories such as: fast slow unit integration database api smoke Tags are useful when you want to run only certain groups of tests, for example only fast unit tests during development, or only integration tests in a CI pipeline. 1. Basic Example […]

Wayan · 5 min read
JUNIT / NOTES</>↗
JUnit11 Jul 2026

How do I use @EnumSource to test enum values?

@EnumSource is a JUnit 5 parameterized-test source that runs the same test once for each selected enum constant. Basic usage import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; import static org.junit.jupiter.api.Assertions.assertNotNull; class DirectionTest { enum Direction { NORTH, SOUTH, EAST, WEST } @ParameterizedTest @EnumSource(Direction.class) void shouldTestAllDirections(Direction direction) { assertNotNull(direction...

Wayan · 3 min read
JUNIT / NOTES</>↗
JUnit11 Jul 2026

How do I use @MethodSource for dynamic test data?

In JUnit 5, @MethodSource lets you supply test arguments from one or more factory methods. It is commonly used with @ParameterizedTest when your test data is too complex for @ValueSource or @CsvSource. Basic example import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertTrue; class StringTest { @ParameterizedTest @MethodSource("blankStrings")...

Wayan · 4 min read
JUNIT / NOTES</>↗
JUnit11 Jul 2026

How do I use @CsvFileSource to load test data from a file?

Use JUnit 5’s @CsvFileSource with a parameterized test to load rows from a CSV file and pass each row into your test method. 1. Add the CSV file Place the CSV file under src/test/resources, for example: src/test/resources/test-data/users.csv Example CSV: username,age,active alice,30,true bob,25,false charlie,40,true 2. Use @CsvFileSource import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvFileSource; import static org.junit.jupiter.a...

Wayan · 3 min read
JUNIT / NOTES</>↗
JUnit11 Jul 2026

How do I use @CsvSource in JUnit parameterized tests?

To use @CsvSource in JUnit 5 parameterized tests, you define multiple sets of comma-separated input values directly inside the annotation. Each CSV row becomes one test invocation. 1. Add the Required Imports import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import static org.junit.jupiter.api.Assertions.assertEquals; @CsvSource is part of JUnit Jupiter Params, so make sure your project includes the parameterized test […]

Wayan · 3 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.