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

October 2017
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Apr    

Find me on Facebook

Find me on Facebook
Skip to content

Sanjeev Shrestha

Day: October 25, 2017

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

Disabling Cache in Tests

Disable Caching in your test in your Spring boot application by adding following properties in application.properties file in your test resources folder

spring.cache.type = none

This will disable the cache in your tests.

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