Tag: Unit Testing

Types of Test Data You Should Use for Your Software Tests

Testing is an integral and vital part of creating software. In fact, test code is as important as your production code. When you create test code, you need to generate test data for your code to work against. This post is about the different types of test data that are used in software testing. I’ll elaborate on each type and explain what test types are used in which scenarios. Types of Test Data Valid Data As the name implies, this is the data that your program expects and should operate on. You …

Using H2 as in memory database for unit/component tests instead of MySQL

h2 database

So following my recent post regarding the creation of a component test framework – let’s take a closer look in the use case of using H2 as a lightweight in memory database instead of MySQL, for your unit/component tests. Benefits of using H2 instead of MySQL It makes a lot of sense to use H2 in the context of component tests instead of MySQL: You can create and destroy a DB/table/data on the fly – once the tests are done the DB disappears. Compare this to having to rollback manually every change …