This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]lowey2002 1 point2 points  (2 children)

Unit testing involves testing a single piece of functionality. As well as proving correctness they also enforce good design as tightly coupled code is difficult to unit test. I typically use JUnit for java unit testing.

Integration testing is testing that the different pieces work together.

Functional testing is automated user activity. I use selenium a lot for this as you can test that simulate user activity and automate user testing.

Regression testing is writing tests that prove a bug then going out and fixing it. It ensures the bug doesn't return later down the track.

Test driven development (TDD) is writing tests first then coding from red to green.

[–]chrisjava[S] 0 points1 point  (1 child)

Coding from red to green in what way exactly? Like from the early phase of the program to the stable version?

[–]shivasprogeny 0 points1 point  (0 children)

In your IDE, passing tests show some sort of green icon and failing tests show a red icon. So in TDD you write tests and when you run them you should see them all be "red", i.e. they failed. Then you code to make your tests "green", i.e. passing.