Skip to content

Example to show how to use surefire categories with JUNIT, Maven and surefire

Notifications You must be signed in to change notification settings

AbhilashaSGupta/Surefire-category-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Group Hiearchy:
                              AllTests               StandaloneTests
                ______________/  |   \_________
               /                 |             \
          ATests             BTests          CTests
      ____/  |  \______   ____/                /
     /       |         \ /                    /
 AaTests    AbTests   AbTests                /
              \_____________   _____________/
                            \ /
                          AbCTests


Tests:
  *test output*     *groups*
onlnyInAllTest    AllTests
ATest             ATests
BTest             BTests
CTest             CTests
ABTest            AbTests
ABTest2           BTests ATests
AaTest            AaTests
AbTest            AbTests
AbCTest           AbCTests
standaloneTest    StandaloneTests
everytimeTest



Default tests with category: ATests
$ mvn verify
ATest
AaTest
AbTest
ABTest
ABTest2
AbCTest

$ mvn verify -Dtest.group="ninja.abhilasha.test.category.ATests && ninja.abhilasha.test.category.BTests"
ABTest
ABTest2

$ mvn verify -Dtest.group='ninja.abhilasha.test.category.AllTests && !ninja.abhilasha.test.category.CTests'
onlnyInAllTest
ATest
AaTest
AbTest
ABTest
ABTest2
BTest

$ mvn verify -Dtest.group='ninja.abhilasha.test.category.CTests || !ninja.abhilasha.test.category.ATests'
CTest
AbCTest
everytimeTest
onlyInAllTest
BTest

$ mvn verify -Dtest.exgroup="ninja.abhilasha.test.category.CTests"
ATest
AaTest
AbTest
ABTest
ABTest2


About

Example to show how to use surefire categories with JUNIT, Maven and surefire

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages