How maven pom.xml identifies the testng test cases in a non-standard project structure?

前端 未结 1 1770
长发绾君心
长发绾君心 2021-01-23 12:10

I am completely new to maven and testng. I am using maven as build tool, and testng as my testing framework. I am not following the standard maven project structure. Now I want

1条回答
  •  太阳男子
    2021-01-23 12:40

    If you keep this in a single place you need to set the testClassesDirectory argument of the maven-surefire-plugin configuration:

    
      [...]
      
        
          
            org.apache.maven.plugins
            maven-surefire-plugin
            2.17
            
              path/to/compiled test classes
            
          
        
      
      [...]
    
    

    All of this is well documented in the Maven Surefire Plugin Documentation

    0 讨论(0)
提交回复
热议问题