Even More Testing With Scalatest

One important feature of any test framework is setting up a test fixture and tearing it down afterwards. In JUnit 3 for you did that by overriding the methods setup() and teardown() of the class TestCase, which every test needed to extend. JUnit 4 was a little more flexible. The name of the methods was [...]

Properties of a Good Unit Tests

Question: what are the properties which make a test a good unit test? If you have a good answer, check out my answer and add to it in the comments. If you don’t here is mine. Long Descriptive Name: For example returnsNullWhenCalledOnEmptyList is a nice name for a test Simple Clean Structure: A test performs [...]

Posted in: Softwaredevelopment by Jens Schauder 4 Comments