I have to link my tests with testrail and for that I have to use the testrailrunner. But if I exclude the springjunit runner then my tests fail on starting the service and its not possible to use both the runners
What's a workaround for this so that my tests get inititalize with the service beans and still logg in test rail?
There is no way to have multiple test runners on single unit test, but use can use JUnit rules instead.
Spring introduces support for
@Rules
in 4.2 (4.2 RC1 is the latest version): https://jira.spring.io/browse/SPR-7731I am not familiar with
testrailrunner
, but if it has no support for JUnit rules, you can:testrail
SpringJUnit4ClassRunner
andtestrailrunner