How to pre-define the running sequences of junit test cases?

后端 未结 5 1768
无人及你
无人及你 2021-01-11 09:44

I have a test class in java and there are several methods annotated by @Test in it, somehow, i want to Junit run method A before method B when i run the whole tests. Is it p

5条回答
  •  旧时难觅i
    2021-01-11 10:33

    use the following to setup thing before and after tests

    @Before
    public void setUp() throws MWException {
    
    }
    
    @After
    public void tearDown() {
    
    }
    

提交回复
热议问题