• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Are Your Tests Really Helping You?
 

Are Your Tests Really Helping You?

on

  • 4,741 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.

Statistics

Views

Total Views
4,741
Views on SlideShare
3,986
Embed Views
755

Actions

Likes
7
Downloads
18
Comments
3

12 Embeds 755

http://elblinkin.info 623
http://protalk.me 41
http://bitly.com 27
http://protalk.ldev 23
http://paper.li 17
http://lanyrd.com 8
http://a0.twimg.com 5
http://192.168.0.100 3
http://coderwall.com 3
http://www.linkedin.com 3
http://dev.protalk.nl 1
http://zootool.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Look at my blog for more details: http://elblinkin.info
    Are you sure you want to
    Your message goes here
    Processing…
  • 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.
    Are you sure you want to
    Your message goes here
    Processing…
  • 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
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Are Your Tests Really Helping You? Are Your Tests Really Helping You? Presentation Transcript