Talk:Unit testing

From Wikipedia, the free encyclopedia

Contents

[edit] Unit tests without a framework

This was written By SangameswaraRao Udatha

Writing a test cases using a framework such as JUnit is common. One can also write programs that test other programs without using a framework. However unit test does not always mean writing test case programs. Unit tests can be manual too.

Unit test are tests done by programmers to make sure a low level code works as he intended.

" When basic, low-level code isn't reliable, the requisite fixes don't stay at the low level. You fix the low level problem, but that impacts code at higher levels, which then need fixing, and so on." - Andy Hunt and Dave Thomas

Erm... so what do you want to do? β€” Edward Z. Yang(Talk) 21:20, 25 April 2006 (UTC)

[edit] Regression

Should 'regression' point to the page on 'regression testing'?

[edit] Extreme programming's use of unit tests

"Extreme Programming and most other methods use unit tests to perform white box testing."

Maybe I'm just splitting hairs here. But XP and TDD use unit tests more as black box. From an outside point of view, you figure how you want to use the code. Then, you write the code that makes it happen. White box implies looking at the code and determining test cases to test it. Maybe this is a gray area (pun partially intended.) DRogers 18:39, 14 September 2006 (UTC)

It's more of a terminology issue. From what I've heard, eXtreme Programming founded Test-Driven Development, and advocates under-the-hood testing to make sure everything gets covered. β€” Edward Z. Yang(Talk) 22:57, 14 September 2006 (UTC)
Well, it's under-the-hood of the project, but each module is still a black box as far as the tests are concerned... right? I guess the text refers to "project white box testing", since the tests "see" the inner modules. --Pedro 23:57, 4 October 2006 (UTC)

[edit] Removed links

These are all by the same author. β€” Edward Z. Yang(Talk) 23:07, 12 October 2006 (UTC)

[edit] Techniques: minor cleanup requested

The first two paragraphs of the section, "Techniques" don't run together. The IEEE standard for Software Unit Testing, albeit dated, isn't foreign to what occurs today for unit testing (a practice that is most decidedly automated). Perhaps the text regarding the standard should be removed altogether? .digamma 00:08, 28 October 2006 (UTC)

Or if the section is fine as is remove the cleanup-requested banner..digamma 22:27, 31 October 2006 (UTC)
I have cleaned this section up - hopefully it is less confusing now. Cleanup tag removed.--Michig 14:42, 24 November 2006 (UTC)

[edit] Clarification requested re role of mock objects in 'separation'

In the lead we currently have the following clause: "constructs such as mock objects can assist in separating unit tests". Could someone clarify what this means? Are we separating unit tests from each other, or from other 'modules' in the system. I guess this is something to do with being able to run unit tests on modules in isolation from other possibly buggy modules, but this isn't clear (at least to me) from the way it is currently worded. Stumps 15:18, 24 November 2006 (UTC)

While this article perhaps does not make this clear, the linked Mock object article expands on this. Does it need any further explanation in this article, or would this be unnecessary duplication?--Michig 15:37, 24 November 2006 (UTC)
Thanks. I've tried to make the lead section a little clearer, without unnecessarily duplicating information from the mock object article. 83.5.247.168 06:37, 25 November 2006 (UTC) [oops ... wasn't logged in! Stumps 06:38, 25 November 2006 (UTC)]

[edit] Code Hygiene

The section on facilitating change touches on this obliquely, but I think that code hygiene is a separate goal. Most people have worked on codebases that are either deteriorating or have already deteriorated, with the dreaded "don't touch that, nobody understands it" sections. β€”The preceding unsigned comment was added by 131.107.0.73 (talk) 18:38, 18 January 2007 (UTC).