Skip to content

Conversation

@hiranya911
Copy link
Contributor

@hiranya911 hiranya911 commented Apr 21, 2017

Some minor changes to pom.xml based on today's release experience.

Adding a flag to disable unit tests and integration tests separately

  • -DskipITs (skips integration tests; flag provided by maven failsafe plugin)
  • -DskipUTs (skips unit tests; custom flag added to pom.xml)

Also the failsafe plugin knows to look for *IT.java tests. We don't have to explicitly mention it in the pom.

Skipping integration tests in the release profile

Maven-based release is conducted in 2 main steps:

  • mvn release:prepare
  • mvn release:perform

The prepare step builds and runs all tests (both unit and integration) before tagging the source in GitHub. The perform step grabs the source from the tag, and proceeds to build and test it again. Therefore we end up running the integration test suite twice during the release process which is redundant and takes time. This PR sets the skipITs flag in the release profile which essentially skips integration tests during release:perform.

…tegration tests during release:perform (they are executed once in release:prepare)
Copy link

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM though consider using a more verbose flag name.


```
mvn verify -Dfirebase.it.certificate=path/to/your/serviceAccount.json -Dskip.surefire.tests=true
mvn verify -Dfirebase.it.certificate=path/to/your/serviceAccount.json -DskipUTs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an existing convention? Or could we spell this out as skipUnitTests (which I think would be much clearer)? :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maven failsafe plugin which is in charge of running integration tests supports a skipITs flag out of the box. I thought we could support a similarly named flag for skipping unit tests. WDYT?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, cool. If it's an existing convention I'm fine with it.

@hiranya911 hiranya911 merged commit 245f64d into master Apr 21, 2017
@hiranya911 hiranya911 deleted the hkj-pom-update branch April 21, 2017 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants