Sanjeev Shrestha

  • Github
  • Twitter
  • Linkedin
  • Behance
  • Tutorials
  • Features
  • Topics
  • Machine Learning
  • Photography
  • Tips and Tricks

Recent Posts

  • Running a single test with Maven
  • Disabling Cache in Tests
  • Changing Springboot Properties at runtime in tests
  • Using Docker to build Software
  • Creating Code Coverage reports with JaCoCo Maven Plugin

Recent Comments

Calendar

January 2021
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031
« Oct    

Find me on Facebook

Find me on Facebook
Skip to content

Sanjeev Shrestha

Category: maven

Running a single test with Maven

We can test just one class with maven by providing the test class as follows

$ mvn -Dtest=com.abc.package.xyz.TestClass test

or just one test

$ mvn -Dtest=com.abc.package.xyz.TestClass#TestMethod

Saves a lot of time when you want to skip all the tests but one.

Posted on October 25, 2017October 25, 2017 by Sanjeev Shrestha 0
Create a website or blog at WordPress.com
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy