0
Jenkins User Conference      San Francisco, Oct 2nd 2011   #jenkinsconf       Twitter4J, Jenkins and Regression           ...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   Who Am I?     10+ years experience in Java     Auth...
Jenkins User Conference     San Francisco, Oct 2nd 2011   #jenkinsconf   What is Twitter4J     Open-source library for the...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   Tools Powering Twitter4J                           ...
Jenkins User Conference        San Francisco, Oct 2nd 2011   #jenkinsconfThe release flow                          release...
Jenkins User Conference     San Francisco, Oct 2nd 2011   #jenkinsconf   Test-driven Development            1. Write a tes...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   The Timeline     May 2007: Started Twitter4J projec...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   The Timeline     May 2007: Started Twitter4J projec...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   The Timeline     May 2007: Started Twitter4J projec...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   The Timeline     May 2007: Started Twitter4J projec...
Jenkins User Conference     San Francisco, Oct 2nd 2011   #jenkinsconfThe Issue Version: Twitter4J 2.1.5 Symptom: certain ...
Jenkins User Conference           San Francisco, Oct 2nd 2011     #jenkinsconfDirect Cause of the Issue bug in StringUtil ...
Jenkins User Conference              San Francisco, Oct 2nd 2011   #jenkinsconf Why StringUtil.split()  String#split() - @...
Jenkins User Conference       San Francisco, Oct 2nd 2011   #jenkinsconfGeneral Cause of Software RegressionsW/ test cases...
Jenkins User Conference      San Francisco, Oct 2nd 2011   #jenkinsconfGeneral Cause of Software RegressionsW/ test cases ...
Jenkins User Conference       San Francisco, Oct 2nd 2011   #jenkinsconfGeneral Cause of Software RegressionsW/ test cases...
Jenkins User Conference        San Francisco, Oct 2nd 2011   #jenkinsconfIgnoring Failed Test Cases Generally not recommen...
Jenkins User Conference       San Francisco, Oct 2nd 2011   #jenkinsconfGeneral Cause of Software RegressionsW/ test cases...
Jenkins User Conference        San Francisco, Oct 2nd 2011   #jenkinsconfGeneral Cause of Software Regressions W/ test cas...
Jenkins User Conference               San Francisco, Oct 2nd 2011   #jenkinsconfRuined Tests with Basic Auth Deprecation  ...
Jenkins User Conference               San Francisco, Oct 2nd 2011   #jenkinsconfRuined Tests with Basic Auth Deprecation  ...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconfLessons Learned - 1 check the Ages of failed tests
Jenkins User Conference    San Francisco, Oct 2nd 2011   #jenkinsconfLessons Learned - 2 be very careful when you refactor...
Jenkins User Conference                San Francisco, Oct 2nd 2011   #jenkinsconf   Thank You To Our Sponsors    Platinum ...
Jenkins User Conference   San Francisco, Oct 2nd 2011   #jenkinsconf   Who Am I?
Upcoming SlideShare
Loading in...5
×

Jenkins User Conference - Twitter4J, Jenkins and regression

2,634

Published on

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,634
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
30
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Transcript of "Jenkins User Conference - Twitter4J, Jenkins and regression"

  1. 1. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Twitter4J, Jenkins and Regression Yusuke Yamamoto Twitter4J.org / Twitter, Inc. http://twitter4j.org/
  2. 2. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Who Am I? 10+ years experience in Java Author of open-source tools including: – Samurai http://samuraism.jp/samurai/ – Twitter4J http://twitter4j.org/
  3. 3. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf What is Twitter4J Open-source library for the Twitter API Compatible with – Java 1.4.2+ – Android – Google App Engine Available since Jun 2007
  4. 4. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Tools Powering Twitter4J Maven Central repo
  5. 5. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfThe release flow release:perform git push origin master oss.sonatype.org service hook promote dev twitter4j.org github.com repo1.maven.org
  6. 6. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Test-driven Development 1. Write a test case which fails 2. Implement and commit 3. Run test cases 4. J NO regression
  7. 7. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf The Timeline May 2007: Started Twitter4J project Mar 2009: Applied Hudson
  8. 8. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf The Timeline May 2007: Started Twitter4J project Mar 2009: Applied HudsonWith Jenkins applied, your software should be regression free…
  9. 9. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf The Timeline May 2007: Started Twitter4J project Mar 2009: Applied Hudson Oct 2010: Critical regression found
  10. 10. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf The Timeline May 2007: Started Twitter4J project Mar 2009: Applied Hudson Oct 2010: Critical regression found The how and why
  11. 11. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfThe Issue Version: Twitter4J 2.1.5 Symptom: certain method calls fail with 401401:Authentication credentials were missing or incorrect.
  12. 12. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfDirect Cause of the Issue bug in StringUtil – introduced in v2.1.5 – leads invalid OAuth signature in certain conditionpublic static String[] split(String str, String separator){ String[] returnValue; int index; if(-1 == str.indexOf(separator)){ returnValue = new String[0]; }else{... expected actual split(“foo,bar”,”,”) {“foo”, “bar”} √ {“foo”, “bar”} split(“foobar”,”,”) {“foobar”} L {}
  13. 13. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Why StringUtil.split() String#split() - @since Java1.4 Found of a compatibility issue with CLDC – CLDC doesn’t support String#split()Caused by: java.lang.NoSuchMethodError: java.lang.String: method split (Ljava/lang/String;)[Ljava/lang/String; not found at twitter4j.conf.PropertyConfiguration.setFieldsWithTreePath(Ljava/ util/Properties;Ljava/lang/String;)V(PropertyConfiguration.java:196) at twitter4j.conf.PropertyConfiguration.<init>(Ljava/lang/String;)V (PropertyConfiguration.java:121)
  14. 14. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfGeneral Cause of Software RegressionsW/ test cases W/O test cases not enough test implementation coverage wrongly modified external resource test failure(s) ignored became incompatible
  15. 15. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfGeneral Cause of Software RegressionsW/ test cases W/O test cases not enough test implementation coverage wrongly modified external resource test failure(s) ignored became incompatible
  16. 16. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfGeneral Cause of Software RegressionsW/ test cases W/O test cases not enough test implementation coverage wrongly modified external resource test failure(s) ignored became incompatible
  17. 17. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfIgnoring Failed Test Cases Generally not recommended but Sometimes you need to, because – external resource not available or – test failure caused by a component managed by other committer
  18. 18. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfGeneral Cause of Software RegressionsW/ test cases W/O test cases not enough test implementation coverage wrongly modified external resource test failure(s) ignored became incompatible
  19. 19. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfGeneral Cause of Software Regressions W/ test cases W/O test cases not enough test implementation coverage wrongly modified external resource test failure(s) ignored became incompatible test case wrongly modified
  20. 20. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfRuined Tests with Basic Auth Deprecation TwitterTestUnitbefore refactoring: test base class Basic auth & OAuth BasicTest OAuthTest Basic auth OAuth after refactoring: OAuth only not recognized by Maven TwitterTestUnit
  21. 21. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfRuined Tests with Basic Auth Deprecation TwitterTestUnitbefore refactoring: test base class Basic auth & OAuth BasicTest OAuthTest Basic auth OAuth after refactoring: OAuth only not recognized by Maven TwitterTestUnit
  22. 22. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfLessons Learned - 1 check the Ages of failed tests
  23. 23. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconfLessons Learned - 2 be very careful when you refactor test cases make sure that – number of test cases doesn’t change many – code coverage doesn’t decrease smelly trend
  24. 24. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Thank You To Our Sponsors Platinum Sponsor Gold Sponsor Silver Sponsor Bronze SponsorsComing Soon: The CloudBees Newsletter for Jenkinsü Please complete the Jenkins survey to help us better serve the community (bonus: a chance to win an Apple TV!)
  25. 25. Jenkins User Conference San Francisco, Oct 2nd 2011 #jenkinsconf Who Am I?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×