Junit: splitting integration test and Unit tests

后端 未结 6 2267
谎友^
谎友^ 2020-12-22 16:05

I\'ve inherited a load of Junit test, but these tests (apart from most not working) are a mixture of actual unit test and integration tests (requiring external systems, db e

6条回答
  •  盖世英雄少女心
    2020-12-22 17:06

    There's not one right answer. As you've explained, there are several ways to do it which will work. I've done both the file naming scheme and splitting things into different directories.

    It sounds like splitting thing up into different directories might work better for you, and that seems a little clearer to me, so I'd lean towards that.

    I don't think I would try annotations because that seems more fine-grained to me. Do you really want these two types of tests mixed together in the same file? I wouldn't.

提交回复
热议问题