How to exclude Junit tests using Gradle or Maven in Java Applications

Introduction Here in this tutorial I will tell you how to exclude Junit test cases from build automation in Java applications. It’s not about skipping test cases but it’s about excluding test cases for a particular package. Situations may arise when you want to exclude some Junit test cases from running in some environments (for example, uat, prod, etc.) while you are building your Java based application using gradle or maven build tool. For example, you don’t want to run your Junit tests related to Mosquitto or Mqtt in Jenkins…

Continue