Talk:Unit testing
![]() | Computing: Software C‑class Mid‑importance | ||||||||||||
|
|
|
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 6 sections are present. |
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)
Regression
Should 'regression' point to the page on 'regression testing'?
Clarification? Citation? Unit Testing Frameworks
Section "Unit Testing Frameworks": "Unit testing without a framework is valuable in that there is a barrier to entry .. scant unit tests is hardly better than having none at all ...",
This 2nd paragraph sentence seems to contradict it'self. Is the author advocating FOR or AGAINST frameworks? And is this fact or opinion? The citation [10] "Bullseye Testing Technology" does not support this. That source does not discuss "framework", "barrier to entry", "valuable", "easy" or "scant" coverage. Clarification please? 69.248.214.71 (talk) 14:16, 22 May 2013 (UTC)
Missing 'Costs'
There is a 'Benefits' section, for balance the 'Costs' should also be noted. Such costs include :-
- Additional development effort, often exceeding the cost of the feature being developed.
- Ongoing maintenance liability. Any future changes to the code also requires a review and update of the tests.
Given there is a cost to implementing unit tests, there is a risk of a negative return on investment if the test suite doesn't actually identify software defects in less time than it took to write and maintain the unit tests. If the development team are sufficiently adept, it is very rare that defects will exist in a 'unit' in isolation. It is more likely that defects will be introduced at integration or system level where module testing would be of greater value.
Not all software developers agree that unit testing is worthwhile. — Preceding unsigned comment added by Johnpwilson (talk • contribs) 15:50, 11 November 2013 (UTC)
- "negative return on investment if the test suite doesn't actually identify software defects in less time than it took to write and maintain the unit tests."
- Not true, and a basic fallacy of testing. If code luckily happens to be perfect, there is still a value in testing it as it shows that the code is perfect and would also show if the code was imperfect. There is value to this and that value does not disappear just because high quality code isn't making use of it. The value of testing is greater than its obvious value from the bugs that are found, it also brings added value from demonstrating that some parts remain bug free. Viam Ferream (talk) 10:29, 1 September 2014 (UTC)
"Language-level unit testing support" section quality
At this moment the section title and paragraph contents don't correlate with the list of programming languages well.
Among the listed programming languages only D (http://dlang.org/unittest.html) and Cobra (http://cobra-language.com/docs/quality/) do have built-in language level support for unit testing. Other languages do have it through non-specific language constructs (like python through docstring does) or via annotations/other extensions (C# and Java).
So I think that either title and text should be reworded significantly, or the list of language should be reduced to 2: D and Cobra.
Correct me if I'm wrong. — Preceding unsigned comment added by Zerkms (talk • contribs) 01:20, 13 November 2013 (UTC)
- I think that section confused people, because the list is labelled as "Languages that support unit testing include", even though it is in the subsection about languages with built in support. (So it's not completely clear whether that list is supposed to be all languages that support unit testing, or only those that have built-in support for unit testing.) I'll try splitting it into two lists and hope that will help. Aij (talk) 14:59, 21 December 2015 (UTC)
Problem with basic definition in summary
The definitions given in the summary of this article includes testing within a single unit and between multiple units which conflicts with the definitions given by others:
- ISACA defines unit testing as "A testing technique that is used to test program logic within a particular program or module.". ISACA defines integration testing as "evaluat[ing] the connection of two or more components that pass information from one area to another."
- softwaretesting.com gives a definition of unit testing as "a level of software testing where individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed."
- NIST provides synonyms of instance testing and conformance testing and provides the definition "testing an artifact ... against the rules defined in the specification. This form of testing does not directly involve a system under test, but rather a testing artifact that was produced by the system under test."
Revision or verifiable supporting citations are needed. Stephen Charles Thompson (talk) 21:13, 17 October 2018 (UTC)
- Softwaretesting.com is not a reliable source. What are your actual concerns? The definition here is in-line with dozens of books and the NIST definition. Walter Görlitz (talk) 21:32, 17 October 2018 (UTC)
- cite the NIST definition, please, if you will. I'm looking for it now (e.g. [1]) Stephen Charles Thompson (talk) 21:35, 17 October 2018 (UTC)
- I was making reference to what you linked to above. Perhaps the following will help: https://www.google.com/search?q=%22Unit+test%22+site%3Anist.gov Walter Görlitz (talk) 23:43, 17 October 2018 (UTC)
- cite the NIST definition, please, if you will. I'm looking for it now (e.g. [1]) Stephen Charles Thompson (talk) 21:35, 17 October 2018 (UTC)