Thursday, February 7, 2019

Run specific Junit unit test on Maven

How to run specific test within Maven mvn 

  1. Click on the module Run... button
  2. Add your own argument : for ex, instead of clean deploy , write
     test  -Dtest=**PeriodicFlow*Test#simpleChatAndCheckChatExposureLatencyAndMCS  -DfailIfNoTests=false
    This argument stands for 
    For running the Java Test file PeriodicFlow (like PeriodicFlowAlphaTest , PeriodicFlowColoTest etc ) 
    and will run only this test method simpleChatAndCheckChatExposureLatencyAndMCS
  3. you can also run an entire file / package etc ...