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

March 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« 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
  • Follow Following
    • Sanjeev Shrestha
    • Already have a WordPress.com account? Log in now.
    • Sanjeev Shrestha
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar