How to deal with the test data in Junit?

后端 未结 5 1296
情书的邮戳
情书的邮戳 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:35

    Hard code them in the tests so that they are close to the tests that use them, making the test more readable.

    Create the test data from a real log file. Write a list of the tests intended to be written, tackle them one by one and tick them off once they pass.

提交回复
热议问题