Skip to main content
edited body
Source Link
Péter Török
  • 46.6k
  • 16
  • 163
  • 185

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable. And once someone experiences that feeling of safety, and confidence (in yourin one's code) that a successful unit test run gives, there is usually no turning back.

If she is sort of convinced but afraid to venture into the new area, offer her a pair programming session to write her first unit tests together. Pick a class which is not too difficult to test but complex enough so that it is worth testing.

However, if she isn't convinced, you may need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable. And once someone experiences that feeling of safety and confidence (in your code) that a successful unit test run gives, there is usually no turning back.

If she is sort of convinced but afraid to venture into the new area, offer her a pair programming session to write her first unit tests together. Pick a class which is not too difficult to test but complex enough so that it is worth testing.

However, if she isn't convinced, you may need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable. And once someone experiences that feeling of safety, and confidence in one's code that a successful unit test run gives, there is usually no turning back.

If she is sort of convinced but afraid to venture into the new area, offer her a pair programming session to write her first unit tests together. Pick a class which is not too difficult to test but complex enough so that it is worth testing.

However, if she isn't convinced, you may need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

added 152 characters in body; added 252 characters in body; added 8 characters in body
Source Link
Péter Török
  • 46.6k
  • 16
  • 163
  • 185

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take so long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable. And once someone experiences that feeling of safety and confidence (in your code) that a successful unit test run gives, there is usually no turning back.

If this doesn't convince hershe is sort of convinced but afraid to venture into the new area, you needoffer her a pair programming session to write her first unit tests together. Pick a class which is not too difficult to get on collecting hard factstest but complex enough so that it is worth testing.

However, if she isn't convinced, you may need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take so long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable.

If this doesn't convince her, you need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable. And once someone experiences that feeling of safety and confidence (in your code) that a successful unit test run gives, there is usually no turning back.

If she is sort of convinced but afraid to venture into the new area, offer her a pair programming session to write her first unit tests together. Pick a class which is not too difficult to test but complex enough so that it is worth testing.

However, if she isn't convinced, you may need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

added 523 characters in body; deleted 23 characters in body
Source Link
Péter Török
  • 46.6k
  • 16
  • 163
  • 185

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investmentThe more the code is changed, the more the unit tests pay back your initial investment. It doesn't take so long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable.

If this doesn't convince her, you need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take so long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable.

(One of) the point(s) of automated tests is repeatability. If you do a quick test by hand, you may get it done faster than writing the same as a unit test (for a unit testing beginner at least - anyone experienced in unit testing can churn out tests pretty fast).

But what when tomorrow, or next week, a small (or big...) change is made to the code? Would your colleague happily repeat the same manual tests over and over after each change, to ensure that nothing is broken? Or would she prefer "code and pray"?

The more the code is changed, the more the unit tests pay back your initial investment. It doesn't take so long to get on the positive side, even without the tests actually catching any bugs. But they regularly do that too - at this point, they become invaluable.

If this doesn't convince her, you need to get on collecting hard facts. Such facts may be

  • defect rates in code written by you vs hers
  • writing a set of unit tests against her code and documenting the bugs found.

Collect some such data, then politely show her the results. If these are still not enough to convince her, you may need to discuss the problem and share your collected evidence with management. That should only be your last resort, but sometimes there is no other way.

Source Link
Péter Török
  • 46.6k
  • 16
  • 163
  • 185
Loading