Continuing test execution in junit4 even when one of the asserts fails

后端 未结 6 1250
无人及你
无人及你 2020-12-02 16:55

I have my existing framework built up using Jfunc which provides a facility to continue exection even when one of the asserts in the test case fails. Jfunc uses junit 3.x f

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 17:07

    Use try/finally blocks. This worked in my case:

    ...
    try {
        assert(...)
    } finally {
        // code to be executed after assert
    }
    ...
    

提交回复
热议问题