2 ms·
Unit tests are definitely plenty old. I think that maybe folks aren't quite clear on what "Unit Test" means. Nowadays, "unit test" means a test written into a
by ChrisMarshallNY 6y ago
Unit tests are definitely plenty old.
I think that maybe folks aren't quite clear on what "Unit Test" means.
Nowadays, "unit test" means a test written into an existing test harness system, like JUnit or XCTest (what I use).
In fact, I was writing unit tests for PHP-based Web apps and C++-based Mac software more than twenty years ago. I just had to write my own framework.
Even nowadays, I sometimes write my own framework. For example on my [hopefully] last PHP project, I designed a SaaS-type system, and eschewed PHPUnit; mostly because it would need some special installation that might be beyond the ken of the target users. Instead, I wrote my own test harness system, and it worked great. It wasn't a crazy amount of extra work. I always create massive tests, anyway, so it wasn't that big a deal.
For my Apple/Swift work, I rely on XCTest, which is a perfectly acceptable test harness.
I'm pretty sure that unit tests were mentioned in Writing Solid Code, which is almost 30 years old.