Data-driven tests with jUnit

后端 未结 10 602
囚心锁ツ
囚心锁ツ 2020-12-05 00:33

What do you use for writing data-driven tests in jUnit?

(My definition of) a data-driven test is a test that reads data from some external source (file, database, ..

10条回答
  •  萌比男神i
    2020-12-05 01:15

    I use an in-memory database such as hsqldb so that I can either pre-populate the database with a "production-style" set of data or I can start with an empty hsqldb database and populate it with rows that I need to perform my testing. On top of that I will write my tests using JUnit and Mockito.

提交回复
热议问题