Carlos Mario
Carlos Mario

Reputation: 159

How to run test methods individually with Citrus Framework?

I have the next code

@Test
public class ApiTestIT extends TestNGCitrusTestDesigner {
    @CitrusTest(name = "testApi2IT")
    public void testApi1IT() {
        //TO-DO here
    }

    @CitrusTest(name = "testApi2IT")
    public void testApi2IT() {
        echo("Hello Citrus!");
    }
}

How can i run test methods individually?

I trying using -Dtest and -Dit.test bad no work; always run the test at same time.

Thanks

Upvotes: 0

Views: 383

Answers (1)

Sven Hettwer
Sven Hettwer

Reputation: 53

To execute single test methods, you have to specify them in the -Dit.test specification like -Dit.test=ApiTestIT#testApi2IT.

Nevertheless, this functionality is not provided by citrus but by the maven failsafe plugin. For more information, have a look at the documentation for Running a Single Test

Some examples with citrus can be found in the Citrus samples repository.

Upvotes: 1

Related Questions