Artwork

Контент предоставлен iteration podcast, John Jacob, and JP Sio - Web Developers. Весь контент подкастов, включая эпизоды, графику и описания подкастов, загружается и предоставляется непосредственно компанией iteration podcast, John Jacob, and JP Sio - Web Developers или ее партнером по платформе подкастов. Если вы считаете, что кто-то использует вашу работу, защищенную авторским правом, без вашего разрешения, вы можете выполнить процедуру, описанную здесь https://ru.player.fm/legal.
Player FM - приложение для подкастов
Работайте офлайн с приложением Player FM !

Building Tests

38:37
 
Поделиться
 

Manage episode 237182639 series 1900125
Контент предоставлен iteration podcast, John Jacob, and JP Sio - Web Developers. Весь контент подкастов, включая эпизоды, графику и описания подкастов, загружается и предоставляется непосредственно компанией iteration podcast, John Jacob, and JP Sio - Web Developers или ее партнером по платформе подкастов. Если вы считаете, что кто-то использует вашу работу, защищенную авторским правом, без вашего разрешения, вы можете выполнить процедуру, описанную здесь https://ru.player.fm/legal.

Chapter 4 - Building Tests

To do refactoring properly, I need a solid suite of tests to spot my inevitable mistakes.

The Value of Self-Testing Code

  • make sure all tests are fully automatic and that they check their own results
  • a suite of tests is a powerful bug detector that decapitates the time it takes to find bugs

If you want to refactor, you have to write tests

A First Test

  • simplicity of feedback from tests. just dots
  • personally like verbose test output

Add Another Test

Testing should be risk driven; remember, I'm trying to find bugs, now or in the future. Therefore I don't test accessor methods that just read and write a field. They are so simple that I'm not likely to find a bug there.

My focus is to test areas that I'm most worried about going wrong.

Probing the Boundaries

  • Seeing what happens when things go wrong

Whenever I have a collection of something, ... I like to see what happens when it's empty

  • What happens when negative numbers are passed to a function that expects positive numbers? Division by zero?
    How do you probe boundaries?

Much More Than This

When you get a bug report, start by writing a unit test that exposes the bug


Picks

  • JP: Taking time off
  continue reading

78 эпизодов

Artwork

Building Tests

iteration

113 subscribers

published

iconПоделиться
 
Manage episode 237182639 series 1900125
Контент предоставлен iteration podcast, John Jacob, and JP Sio - Web Developers. Весь контент подкастов, включая эпизоды, графику и описания подкастов, загружается и предоставляется непосредственно компанией iteration podcast, John Jacob, and JP Sio - Web Developers или ее партнером по платформе подкастов. Если вы считаете, что кто-то использует вашу работу, защищенную авторским правом, без вашего разрешения, вы можете выполнить процедуру, описанную здесь https://ru.player.fm/legal.

Chapter 4 - Building Tests

To do refactoring properly, I need a solid suite of tests to spot my inevitable mistakes.

The Value of Self-Testing Code

  • make sure all tests are fully automatic and that they check their own results
  • a suite of tests is a powerful bug detector that decapitates the time it takes to find bugs

If you want to refactor, you have to write tests

A First Test

  • simplicity of feedback from tests. just dots
  • personally like verbose test output

Add Another Test

Testing should be risk driven; remember, I'm trying to find bugs, now or in the future. Therefore I don't test accessor methods that just read and write a field. They are so simple that I'm not likely to find a bug there.

My focus is to test areas that I'm most worried about going wrong.

Probing the Boundaries

  • Seeing what happens when things go wrong

Whenever I have a collection of something, ... I like to see what happens when it's empty

  • What happens when negative numbers are passed to a function that expects positive numbers? Division by zero?
    How do you probe boundaries?

Much More Than This

When you get a bug report, start by writing a unit test that exposes the bug


Picks

  • JP: Taking time off
  continue reading

78 эпизодов

Все серии

×
 
Loading …

Добро пожаловать в Player FM!

Player FM сканирует Интернет в поисках высококачественных подкастов, чтобы вы могли наслаждаться ими прямо сейчас. Это лучшее приложение для подкастов, которое работает на Android, iPhone и веб-странице. Зарегистрируйтесь, чтобы синхронизировать подписки на разных устройствах.

 

Краткое руководство