How to deal with the test data in Junit?

后端 未结 5 1299
情书的邮戳
情书的邮戳 2021-01-05 15:13

In TDD(Test Driven Development) development process, how to deal with the test data? Assumption that a scenario, parse a log file to get the needed column. For a strong test

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 15:16

    Another option is to mock out your data, eliminating any dependency on external sources. This way it's easy to test various data conditions without having to have multiple instances of external test data. I then generally use full-fledged integration tests for lightweight smoke testing.

提交回复
热议问题