Nikita Burak
Nikita Burak

Reputation: 27

How to run only one test method via ant in Hybris

I have test class MyTest:

package com.my.package;
...
@IntegrationTest
public class MyTest extends ServicelayerTest {
    @Test
    public myTest1() {...}

    @Test
    public myTest2() {...}
}

I only need to run the myTest1() test via ant.

To run all integration tests from the class, I can use

ant integrationtests -Dtestclasses.packages='com.my.package.MyTest'

How to run only one myTest1() ? Maybe I can use something like

ant integrationtests -Dtestclasses.packages='com.my.package.MyTest#myTest1()' ?

Upvotes: 0

Views: 524

Answers (1)

geffchang
geffchang

Reputation: 3340

There is no filter that lets you run JUnit by method name.

Check the Filters documentation on what is supported: https://help.sap.com/docs/SAP_COMMERCE/d0224eca81e249cb821f2cdf45a82ace/f7f454a4f5254944a366db9bdf129be6.html

Upvotes: 1

Related Questions