The tests only run if…

When I did a Maven Install on my project, it didn’t run the tests.  (It had been doing this lack-of-thing for several days, and I just thought it was some weird side effect of it being a Maven multimodule project.)

Well it turns out that in our setup Maven’s using a surefire reports thing that only runs tests whose class names end in …Test.  My classnames usually do, but for this multimodule example, they weren’t really unit tests so I had called them BlahBlahExample.  (This worked fine to run them in Eclipse.)

So, I just renamed the classes to end in …Test, and now my tests run when I Maven Install ’em.

(Thanks for the tip, Keith!)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.