Login

Login
  • Register
  • VectorDesign blog

    Testing Automation and general Tech Geek stuff

    Run Maven test on Linux command

    Posted in linux on 4 March 2015 by vectordesign

    to run a Test Class

    mvn test -Dtest=classname
    
    
    
    To run a specific test (@Test) in a class file
    
    
    mvn -Dtest=TestCircle#xyz test

    where TestCircle is the test class name and xyz is the test method,

    wild card characters also work (both in the method name and class name).

     

    To run all tests in a package

    mvn '-Dtest=Tests.bielakias.*Test' test

    this will run all classes named *Test.java under package Tests.bielakias

    Leave a Reply