Just to inline some answers to this thread, in reverse order:
2. The link you want is http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#redirectTestOutputToFile . We set this property in our root pom (and a few more places). To be more explicit, you log via slf4j and runners/direct-java has a test-scoped dependency on slf4j-jdk14 so the logs will go through java.util.logging (JUL) which will write to stdout and it is this that surefire captures and redirects. If you are running a single test and don't want to go digging about for log files after the fact, it appears that this might simplify your workflow: -D maven.test.redirectTestOutputToFile=false Concurrency could make this confusing, so check the rest of the docs on managing that if you need to. 1. These are the essentials: -D test=<class or class#method> -D failIfNoTests=false The latter is because of our defaults, intended to catch completely broken configurations/invocations. Given that many routine tasks require this incantation, we should probably remove the default. You can also target more finely, depending on config, by naming the exact execution you want. For example, to run the example integration tests I often use: mvn failsafe:integration-test@dataflow-runner-integration-tests -pl examples/java <many more options> To save wasted time during iterative development I use: -D findbugs.skip -D checkstyle.skip -D rat.skip -D javadoc.skip -D mdep.analyze.skip I don't really know which is these get implied by which of the needlessly linearized build targets, so I just keep them on my command lines, which I keep in a cheat sheet because they are far too unwieldy otherwise. Kenn On Tue, Apr 4, 2017 at 9:40 AM, Dan Halperin <[email protected]> wrote: > On Mon, Apr 3, 2017 at 6:21 PM, Pablo Estrada <[email protected]> > wrote: > > > Hello there, > > I'm running RunnableOnService tests on the DirectRunner, with 'mvn clean > > verify' in runners/direct-java; and I'd like to add some logging to > figure > > out what's going on in some failures. My question is: > > > > 1. Is there a way to run only a specific test with maven? > > > > Google for "maven run specific test" -- first hit is > http://maven.apache.org/surefire/maven-surefire- > plugin/examples/single-test.html > > > > 2. Is there extra configuration needed to collect logs written during the > > test (Specifically, logs written from PAssert) > > > 3. If not, where should I look for these logs? A file? Stdout? > > > > Google for "maven test output" -- first hit is > http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html > > Generally reading the config for the plugin you're using is the best way to > debug Maven issues. Here, the default is to output to a specific file > detailed in the config, but you can also make it log to stdout if you care > to. > > Hope that helps! > Dan > > > > > > Best! > > -P. > > >
