Talk:Unit testing

History
I'd like to see information about the history of formal unit testing, when did it come about, for what technologies, when was it popularised etc???

Ian —Preceding unsigned comment added by 82.10.239.38 (talk) 19:26, 10 February 2008 (UTC)

I agree strongly. Also who invented the name? 06:53, 22 February 2012 (UTC) — Preceding unsigned comment added by 203.41.222.1 (talk)


 * +1 here as well. would love some history. my contribution: c2 wiki has entries as far back as 1999. all references in the wikipedia article do not go as far back. "testing" was mentionned in my CS training, but not explicitely TDD or Unit tests. I was wondering how old that thing was!!!! oooh and look at this history! It mentions tests in the Mercury space program (1950s'), Ada Lovelace (19th century) and Ward cunningham (1989). See also this, this, this and of course this. --TheAnarcat (talk) 14:00, 28 March 2015 (UTC)


 * +1 here as well. Unit testing has existed long before "Unit Testing Frameworks". Even the core definition of Unit Testing in this Wiki article is being related to specific software components. This definition is more about "Unit Testing Frameworks" rather than "Unit Testing". The core WIKI definition of "Unit Testing" being presented here is actually the definition of "Unit Tests in Unit Testing Frameworks". Completely wrong article resulting in incorrect other WIKI pages in the definitions and separations between "Functional Testing" and "Non Functional Testing" and "Unit Testing". — Preceding unsigned comment added by 115.70.45.139 (talk) 23:23, 13 February 2020 (UTC)

The history section needed rewriting as it is completely inaccurate and misleading. Indeed, unit testing is a term used since the infancy of software engineering in the sixties (if not earlier), as a number of mentions in academic paper prove (e.g.  Experiences with the goddard computing system during manned spaceflight missions, 1964, or System integration as a programming function', 1969, or An analysis of the resources used in the SAFEGUARD system software development, 1976, or The value of a proper software quality assurance methodology, 1978, which mentioned also unit test automation, to name only a few). This in now DONE — Preceding unsigned comment added by Cth027 (talk • contribs) 00:48, 22 March 2024 (UTC)

IEEE 29119 on automated unit testing
What does IEEE 29119 have to say about automated unit testing? I don't have access to the standard, but it would be extremely relevant. --Elephanthunter (talk) 00:30, 8 May 2019 (UTC)


 * Meh. I doubt that. Feel free to prove me wrong. Stevebroshar (talk) 14:28, 15 April 2024 (UTC)

TDD...
Concerning TDD: "When the tests pass, that code is considered complete."

Any description of TDD that downplays or dismisses the refactoring part of the cycle is an outlandishly false description of TDD. AlexMc (talk) 20:11, 29 August 2020 (UTC)
 * I agree. WP:SOFIXIT. If you don't do so, or can't, please let me know and I'll see what I can do. Walter Görlitz (talk) 03:07, 31 August 2020 (UTC)
 * Improve it. Less complaining and more doing. Stevebroshar (talk) 14:28, 15 April 2024 (UTC)

"Example" section could be much better
The "Example" section is copy / paste code, hardly an example of great design, and may exaggerate the impression that the test code will be far more work to write than the code under test.

This is a missed opportunity to provide a far more compact table-driven test example. Alternatively, this example could be reduced to about four test cases and still get the point across. — Preceding unsigned comment added by 2601:601:9900:11A0:41A8:4C8E:7078:97A0 (talk) 05:11, 3 March 2022 (UTC)


 * The missed opportunity is yours. I suggest less complaining and more doing. Stevebroshar (talk) 14:26, 15 April 2024 (UTC)

JUnit in history section
Ridiculous that JUnit is listed as the first Unit Testing Framework in the history section, SUnit was first of the xUnit genre and was in regular use, JUnit was a later port. — Preceding unsigned comment added by 84.9.199.214 (talk) 23:55, 28 March 2023 (UTC)


 * If you're confident about this, feel free to click the edit button and fix the article, preferably with a citation to a reliable source. – Novem Linguae (talk) 02:39, 29 March 2023 (UTC)


 * The history section was significantly developed and this issue should be addressed. --Christophe (talk) 23:53, 24 March 2024 (UTC)

Describtion of several "schools"
I am not an expert in this topic so I am not able to provide the text myself. But to my knowledge there do exist minimum two "schools" of testing with several names.

- "Classical" school, also names as "Detroit" and in rare cases "Chicago" school. It focus on behavior and not on code blocks. - "London" school, or "mockist" school.

This schools are described and compared in the book "Khorikov (2020) Unit Testing - Principles, Practices, and Patterns" for example. Christian Buhtz (talk) 12:55, 15 April 2024 (UTC)


 * Not saying that that book doesn't talk about such things ... but I've never heard of any of those terms: 'school' of unit testing, classical, detroit, chicago, london, mockist. And I do consider myself an expert in software and unit testing. In general and IMO, it's a weakness of WP is that just because something can be cited does not mean it's notable. At the same time, I cannot claim to know everything about the subject. Stevebroshar (talk) 14:22, 15 April 2024 (UTC)

What is testing criteria?
The section on 'testing criteria' means nothing to me. Here's the content as of today: ''During development, a programmer may code criteria, or results that are known to be good, into the test to verify the unit's correctness. During test execution, frameworks log tests that fail any criterion and report them in a summary. For this, the most commonly used approach is test - function - expected value.''

That's wordy and doesn't make much sense to me.

Seems to be about expected results. I don't think that needs a whole section to describe.

I wonder if the section was added for this concept of testing criteria: https://notes.nicolevanderhoeven.com/Test+criteria#:~:text=A%20test%20criterion%20is%20a,%22acceptable%22%20for%20your%20application. Stevebroshar (talk) 15:04, 15 April 2024 (UTC)