Skip to main content
minor spelling correction
Source Link
gnat
  • 20.5k
  • 29
  • 117
  • 309
> Is unit testing or test-driven development worthwhile?

Is unit testing or test-driven development worthwhile?

Definitely yes (see the other answers)

> [Is it] really a good idea and worth the effort and time?

[Is it] really a good idea and worth the effort and time?

  • Yes if you start something new (add a new module or a completely new application)
  • No if there is already a lot of existing code that was not developped testdrivendeveloped test-driven and that must be extended (legacy).

In my opinion test-driven development is most effective if you write the unittestsunit tests before the actual code. this way the code that fullfillsfulfills the tests becomes clearly seperatedseparated with a minimum of external references that is easy testable.

If the code already exists without the unittestsunit tests there it is usallyusually a lot of extra work to write the unittestsunit tests afterwards because the code was not written for easy testing.

If you do tddTDD the code automatically is easy testable.

> Is unit testing or test-driven development worthwhile?

Definitely yes (see the other answers)

> [Is it] really a good idea and worth the effort and time?
  • Yes if you start something new (add a new module or a completely new application)
  • No if there is already a lot of existing code that was not developped testdriven and that must be extended (legacy).

In my opinion test-driven development is most effective if you write the unittests before the actual code. this way the code that fullfills the tests becomes clearly seperated with a minimum of external references that is easy testable.

If the code already exists without the unittests there it is usally a lot of extra work to write the unittests afterwards because the code was not written for easy testing.

If you do tdd the code automatically is easy testable.

Is unit testing or test-driven development worthwhile?

Definitely yes (see the other answers)

[Is it] really a good idea and worth the effort and time?

  • Yes if you start something new (add a new module or a completely new application)
  • No if there is already a lot of existing code that was not developed test-driven and that must be extended (legacy).

In my opinion test-driven development is most effective if you write the unit tests before the actual code. this way the code that fulfills the tests becomes clearly separated with a minimum of external references that is easy testable.

If the code already exists without the unit tests there it is usually a lot of extra work to write the unit tests afterwards because the code was not written for easy testing.

If you do TDD the code automatically is easy testable.

Source Link
k3b
  • 7.6k
  • 1
  • 21
  • 31

> Is unit testing or test-driven development worthwhile?

Definitely yes (see the other answers)

> [Is it] really a good idea and worth the effort and time?
  • Yes if you start something new (add a new module or a completely new application)
  • No if there is already a lot of existing code that was not developped testdriven and that must be extended (legacy).

In my opinion test-driven development is most effective if you write the unittests before the actual code. this way the code that fullfills the tests becomes clearly seperated with a minimum of external references that is easy testable.

If the code already exists without the unittests there it is usally a lot of extra work to write the unittests afterwards because the code was not written for easy testing.

If you do tdd the code automatically is easy testable.