Specifying an order to junit 4 tests at the Method level (not class level)

前端 未结 6 2173
醉酒成梦
醉酒成梦 2020-12-02 10:50

I know this is bad practice, but it needs to be done, or I\'ll need to switch to testng. Is there a way, similar to JUnit 3\'s testSuite, to specify the order o

6条回答
  •  囚心锁ツ
    2020-12-02 11:08

    Joscarsson and Michael D code in my github repo. I hope they don't mind. I also provide ordered version for Parameterized class. It's already to use as maven dependency

    
        
            git-xxx
            https://github.com/crsici/OrderedRunnerJunit4.11/raw/master/
        
    
    
    
        com.sici.org.junit
        ordered-runner
        0.0.1-RELEASE
    
    

提交回复
热议问题