Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Junit DataProvider tests are skipped when run via spoon plugin #538

@manoj897

Description

@manoj897

My tests uses Junit DataProvider. I have given the sample class below which uses Junit Dataprovider.
The below tests are running when run via Android studio but when used via spoon the below cases are not running. please help me identify if I am missing something

@RunWith(DataProviderRunner.class)
public class TestScenario {

    @DataProvider
    public static String[] dataSetValues() {
        return new String[]{
                "1907020001",
                "1907020002",
                "1907020003",
                "1907020004",
                "1907020005",
                "1907020006",
                "1907020007"
                "1907020008",
                "1907020009"
            };
    }


    @Test
    @UseDataProvider("dataSetValues")
    public void testMethod(String testId) {
        validateFunction1(testId);//The testId is the string from dataSetValues when used with Junit DataProvider
     }

}

while running, the following log was printed

2018-06-12 02:14:11 [SDR.run] Running com.xxx.automation.xxxx.test.Regression.yyy.TestScenario#testMethod[0: 1907020001] on [emulator-5554]
Running am instrument -w -r -e class com.xxx.automation.xxxx.test.Regression.yyy.TestScenario#testMethod[0: 1907020001] com.xxx.automation.xxxx.test/com.xxx.automation.xxx.test.Helper.Utils.CustomTestRunner on Nexus_5x [emulator-5554]
02:14:11 D/InstrumentationResultParser: unrecognized line usage: am [subcommand] [options]
02:14:11 D/InstrumentationResultParser: unrecognized line usage: am start [-D] [-N] [-W] [-P ] [--start-profiler ]
02:14:11 D/InstrumentationResultParser: unrecognized line [--sampling INTERVAL] [-R COUNT] [-S]
.
.
.
02:14:11 D/InstrumentationResultParser: unrecognized line Error: No instrumentation found for: 1907020001]

Looks like the above command is not recognised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions