testingopen-libertyliberty-maven-plugin

How can I execute a subset of tests in OpenLiberty dev mode


In order to execute the whole test suite you only have to press enter key in dev mode.

But how to execute one only test or a subset of the whole test suite?


Solution

  • Since dev mode dynamically loads pom.xml changes, one approach would be to dynamically edit the pom.xml configuration and then hit <Enter> e.g.:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
    
                <configuration>
                    <test>BonusPayoutIT#testForceFailure</test>
                </configuration>
    
            </plugin>