I know it makes perfect sense in your head, but we need a better explanation on what it is you are looking to do. The question in the current state is confusing at best.
In case you'd like to instantiate some beans while running test suite A, and other beans when running test suite B, you have options:
- Use different test configs for suites:
test-suite-a.cong
& test-suite-b.conf
- Use Spring Profiles and run your maven tasks setting an appropriate profile
- I am working two projects which has both same functionalities. And I separated out test cases to the other project.
Sounds a bit strange. If these two projects are the same, combine them into a single project. If they are different, use different src/test/...
for each.