Junit4 and TestNG in one project with Maven

后端 未结 3 988
傲寒
傲寒 2020-12-21 05:38

To run them together there are few options available but I have chosen using different profiles for Junit and TestNG. But now problem is with excluding and including test c

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-21 06:05

    Simplest solution is like this

    
        maven-surefire-plugin
        ${surefire.version}
        
            
                org.apache.maven.surefire
                surefire-junit47
                ${surefire.version}
            
            
                org.apache.maven.surefire
                surefire-testng
                ${surefire.version}
            
        
    
    

    More info about this: Mixing TestNG and JUnit tests in one Maven module – 2013 edition

提交回复
热议问题