0

According to the Wikipedia entry for Unit Testing, it is defined as a technique for testing components of a system in strict isolation from each other, and it is described as having been expressly invented for Software, and having only been applied to Software. In that same Wikipedia entry we read that the first reference to anything even remotely resembling Unit Testing was in a 1956 U.S. Navy Symposium about software, and then again in 1964, in the context of the software developed for NASA's Mercury Project.

However, I once came across a different source, which suggested otherwise.

According to that source, Unit Testing in software is an adaptation of preexisting testing techniques for analog electronic hardware.

This claim sounds plausible, since in electronic hardware, the operation of each component on a PCB is affected by the mere presence of other components on that same PCB, so in order to locate a defect it is of vital importance to test each component in isolation. Additionally, virtually all early computer hardware was analog, and all early programmers were involved with hardware to a greater or lesser degree, (or should I say to a great or greater degree?) so it is reasonable to assume that the first testing methods for software were inspired by existing testing methods for hardware.

Nonetheless, I have to wonder whether this is actually true, and unfortunately, I have forgotten where I first encountered the claim.

So, does this claim ring any bells to anyone?

Can you please help me find the original source of this claim, or otherwise attest, from personal knowledge, that it is in fact true?

What I am essentially looking for is historical references to a systematic approach for testing components (units) of a system in strict isolation from each other, in the context of electronic hardware, before software testing was even a thing. Such an approach would not necessarily be named "Unit Testing", but its aim would have to be the same as the aim of Unit Testing, which is Defect Localization: being able to tell with certainty which unit has a defect, which is impossible when the components are interconnected and therefore interfering with each other.


Here is a discussion corroborating this claim, which though is completely devoid of any references to sources: Reddit.com - When was unit testing first invented?

In the mean time I have gone ahead and repeated this claim in an answer of mine to a question here on Software Engineering, and I do not feel comfortable about the fact that the claim that I have made is not backed by a reference to a source.

Mike Nakis
  • 32,803

2 Answers2

4

So, I was googling this a lot today.

All the sources agree that the term "Unit Test" was popularised by Kent Beck and means whatever he meant it to mean.

Martin Fowler has an interesting anecdote about working with Kent Beck in the early days of extreme programming however

There were definitional concerns about XP's use of unit testing right from the early days. I have a distinct memory of a discussion on a usenet discussion group where us XPers were berated by a testing expert for misusing the term “unit test.” We asked him for his definition and he replied with something like “in the first morning of my training course I cover 24 different definitions of unit test.”

https://martinfowler.com/bliki/UnitTest.html

So the idea of "Unit Test" must have been floating around in the days before SUnit and XUnit. I can't find anything about hardware unit tests except for that reddit posts' deleted comment, but with 24 definitions to choose from maybe one was hardware related.


Edit: I see you have updated your question :

What I am essentially looking for is historical references to a systematic approach to testing components (units) of a system in strict isolation from each other

This is trivial, for example : https://quality-one.com/ppap/

Ewan
  • 83,178
0

Let's change our perspective on this for once. Testing in general is a way to determine the authenticity of the function of an object, be it a knife or armor from the Medieval Ages, spanning all the way to 21st century technology. Unit testing is a way of ensuring all components of said object work in optimal condition. This will allow further objects in the chain/hierarchy to work accordingly. Unit testing can be dated all the way back to medieval-age armorsmiths, ensuring each link moves at just the right differential in any direction to ensure overall movement. Coming to the point, ensuring every bit of hardware works in the optimal condition will respectively ensure that its corresponding software plays its part. Our technology grows, not only to advance human lives but to also play catch up for all the resources we wasted trying to perfect our technology, leaving us richer in knowledge and poorer in resources.