Skip to content

Comments

Support @ParameterizedTest and @RepeatedTest in runnables#200

Merged
tartarughina merged 2 commits intozed-extensions:mainfrom
tartarughina:test-runner
Feb 24, 2026
Merged

Support @ParameterizedTest and @RepeatedTest in runnables#200
tartarughina merged 2 commits intozed-extensions:mainfrom
tartarughina:test-runner

Conversation

@tartarughina
Copy link
Collaborator

Address #198

@tartarughina
Copy link
Collaborator Author

Tested with

package com.example.runnables;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

// Matches: java-test-class, java-test-method (via @Test)
// Matches: java-test-method (via @ParameterizedTest)
// Matches: java-test-method (via @RepeatedTest)
class RunnablesTest {

    @Test
    void standardTest() {
    }

    @ParameterizedTest
    @ValueSource(strings = {"a", "b"})
    void parameterizedTest(String value) {
        System.out.println("Test value: " + value);
    }

    @RepeatedTest(3)
    void repeatedTest() {
    }

    // Matches: java-test-class-nested, java-test-method-nested
    @Nested
    class NestedWithTest {

        @Test
        void nestedStandardTest() {
        }
    }

    @Nested
    class NestedWithParameterizedTest {

        @ParameterizedTest
        @ValueSource(ints = {1, 2})
        void nestedParameterizedTest(int value) {
        }
    }

    @Nested
    class NestedWithRepeatedTest {

        @RepeatedTest(2)
        void nestedRepeatedTest() {
        }
    }
}

@tartarughina tartarughina merged commit 6cda290 into zed-extensions:main Feb 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants