Running JUnit tests with Maven under Eclipse

后端 未结 2 2017
一向
一向 2020-12-15 08:16

I just installed the plugin m2e for the first time on Eclipse.

I wrote a simple JUnit (version 4) test. I can run it from Eclipse, but not from the pom.xml (alt-clic

2条回答
  •  时光取名叫无心
    2020-12-15 08:58

    Add this to your pom.xml

    
      [...]
      
        
          
            
              org.apache.maven.plugins
              maven-surefire-plugin
              2.18.1
            
          
        
      
      [...]
    
    

    run maven with clean test

提交回复
热议问题