Maven - separate integration tests from unit tests

后端 未结 1 1766
醉酒成梦
醉酒成梦 2020-12-15 23:23

Is it possible to isolate integration tests from unit tests within same module?

I created simple pom:



        
相关标签:
1条回答
  • 2020-12-16 00:15

    instead of:

    <exclude>*/integration/**/*.java</exclude>
    

    try:

     <include>*/unit/**.java</include>
    

    then in the integration profile do

    <includes>
       <exclude>**/unit/**/*.java</exclude>
       <include>**/integration/**/*.java</include>
    </includes>
    

    you may have to play with getting the includes/excludes exactly right, but that's the general idea.

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