Wrong confirmation ID
  • Email
  • Favorite
  • Download
  • Embed
  • Private Content

Are Your Tests Really Helping You?

by LB Denker on Oct 09, 2011

  • 2,956 views

Warning: This is advanced content. Prior knowledge of PHPUnit and functional testing are required.

Warning: This is advanced content. Prior knowledge of PHPUnit and functional testing are required.

Accessibility

Categories

Tags

phpunit testing phpnw2011 coding standard codesniffer php phpunit behat codesniffer

More...

Upload Details

Uploaded via SlideShare as Adobe PDF

Usage Rights

© All Rights Reserved

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

7 Embeds 571

http://elblinkin.info 510
http://bitly.com 27
http://paper.li 17
http://lanyrd.com 8
http://a0.twimg.com 5
http://coderwall.com 3
http://zootool.com 1

More...

Statistics

Favorites
4
Downloads
18
Comments
3
Embed Views
571
Views on SlideShare
2,385
Total Views
2,956

13 of 3 previous next Post a comment

  • elblinkin LB Denker , Anthropologist of Developer Culture at Etsy, Inc. Look at my blog for more details: http://elblinkin.info 7 months ago Reply
    Are you sure you want to Yes No
  • elblinkin LB Denker , Anthropologist of Developer Culture at Etsy, Inc. Private methods can grow logic. Also, there are two better alternatives. First you can copy/paste and that will make your tests more readable up front, instead of scrolling back and forth through code to read the test; however, if you find you are copy/pasting a lot of lines, then that is a smell indicating that you should extract to the method to a helper class in your test framework/extension code so that it can be tested. The second could also be a smell indicating that your api is not appropriate in that it requires a lot of context to work and thus is not encapsulated properly. 7 months ago Reply
    Are you sure you want to Yes No
  • zsolttakacs Zsolt Takács i don’t understand why it’s good to eliminate private methods from test classes. it’ll either lead to duplication or very specific test utility classes. I’ve found them really useful, and several patterns use them in Xunit Test Patterns, for example: http://xunitpatterns.com/Test%20Utility%20Method.html 7 months ago Reply
    Are you sure you want to Yes No
Post Comment
Edit your comment Cancel

Are Your Tests Really Helping You? — Presentation Transcript