Agile Testing

1,464 views

Published on

This is for FCity public trainning.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,464
On SlideShare
0
From Embeds
0
Number of Embeds
115
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Agile Testing

  1. 1.     The  Beau(ful  TESTING  
  2. 2. 0 Who We                  Are      
  3. 3. Yongwei Chen
  4. 4. @Lanvige     h-p://lanvige.com
  5. 5. 1 Modern          So3ware   Develop  
  6. 6. h-p://m2.wnymedia.net/files/2009/08/Obama_Change_by_traumerx.jpg  
  7. 7. 软  软件可以变化  正是这个本质的小不同决定着两个不同的发展方向                             h-p://pica.nipic.com/2008-­‐03-­‐31/200833181747900_2.jpg  
  8. 8. One  week  is  a  release  cycle   We  can  release  many  version  in  one  day.  
  9. 9. Internet    Develop  Trend   Q UICK   <   Implement Release Bug fix
  10. 10. 2 Quality?                             TesVng  !  
  11. 11. h-p://pic3.nipic.com/20090515/2596_080459014_2.jpg        Sounds  Great  !!!  
  12. 12. h-p://www.flickr.com/photos/mutsmuts/4695658106/  but Start… how we ?  
  13. 13. 3 Agile   ?   TesVng  
  14. 14.              TEST:  Making  sure  the  applicaVon  does  the  RIGHT  things  RIGHT                                                                                                                                -­‐  Uncle  Bob  
  15. 15. 2  words:  rapid  feedback   Short  feedback  loop  between  testers  and  developers   Find  criVcal  bugs  early  rather  than  late   Testers  are  service  providers,  not  last  line  of  defense   Involve  customers  early  in  wriVng  tests   Focus  on  automaVon  What is agile testing?
  16. 16. 4    Agile   1+1 Team  
  17. 17. h-p://www.infoq.com/cn/news/2011/03/Ensuring-­‐Product-­‐Quality-­‐Google   h-p://googletesVng.blogspot.com/2011/01/how-­‐google-­‐tests-­‐soiware.html   Break  the  old  view   The  whole-­‐team  approach   No  “throwing  code  over  the  wall”  to   QA!   One  project  team,  one  aim   Together     analyze  requirements   Planning   draw  up  acceptance  criteria  Team Logistics
  18. 18. h-p://www.flickr.com/photos/jiheffe/3462940215   Quality  phiosophy   Introducing  Change   Management  ExpectaVons   CommunicaVon  Cultural Challenge
  19. 19. h-p://lh3.ggpht.com/-­‐rphxCwxUlFA/TIOt_1QpG3E/AAAAAAAAAB8/faz3wJMcP0o/MatrixOrangeCrossCulturalChallengesOfWomenAbroad.jpg   Domain   DEV   Expert   Tester  Interaction of Roles
  20. 20. 5      Test   categorizaVon   ?  
  21. 21. h-p://www.flickr.com/photos/withassociates/3659754428/  Level    Unit   &    Integra.on    Acceptance   testAc#on    White  Box    Black  Box  Content    Regression    Func#on    Load   Stress   Performance       Security      A/B   Alpha/Beta  
  22. 22. Agile  TesVng:    h-p://book.douban.com/subject/5338399/  
  23. 23. h-p://julieeconblog.files.wordpress.com/2009/12/taking-­‐test.jpg  Introduction
  24. 24. Unit  Test   è   Do  things  RIGHT  IntegraVon  Test   è   Do  things  RIGHT  Acceptance  Test   è   Doing  the  RIGHT  things  
  25. 25. Unit  Test   è   Test  one  funcVon/   method  at  a  VmeIntegraVon  Test   è   More  coarse-­‐grained   than  unit  testsAcceptance  Test   è   Business  facing
  26. 26. Unit  Test   è   DeveloperIntegraVon  Test   è   QA  &  DeveloperAcceptance  Test   è   Customer  &  QA
  27. 27. data  form  h-p://www.infoq.com/cn/presentaVons/sjw-­‐webtest-­‐baidu  Void     10%  UI  Tes#ng                    Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void   20%  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void  Void    Void  Void  Void  Void  Void    Void  Void  Void  Void     70%  Void  Void  Void    Void  Void    Types  of  tesVng  –  Jason  Huggins’s  TesVng  Pyramid    
  28. 28. 6 Unit  Test   101  
  29. 29. is  a  method  by  which  individual  units  of  source  code  are   tested  to  determine  if  they  are  fit  for  use.  A  unit  is  the   smallest  testable  part  of  an  applicaVon.  In  procedural   programming  a  unit  may  be  an  individual  funcVon  or   procedure.  In  object-­‐oriented  programming  a  unit  is  usually  an   interface,  such  as  a  class.[citaVon  needed]  Unit  tests  are   created  by  programmers  or  occasionally  by  white  box  testers   during  the  development  process.          It’s  for  DEV  
  30. 30. Unit Test each test case Is Unit  Test   Independent   from the others: substitutes like method stubs, mock objects, fakes and test harnesses can be used toSafety control assist testing a module in isolation.
  31. 31. UT  as  second  users   Force  code  loose  coupling    Beautiful Architeture
  32. 32. Break the dependencies
  33. 33. h-p://www.infoq.com/cn/arVcles/thoughtworks-­‐pracVce-­‐partvi   h-p://news.csdn.net/n/20060726/93003.html    Stub, fake & mock
  34. 34. Test is the target
  35. 35. Test Driven Development
  36. 36. TDD Process
  37. 37. Feature:  Change  email        Scenario:  Change  my  email        Given  I  am  signed  in                    And  I  click  on  my  name  in  the  header                    And  I  follow  "seungs"                    Then  I  should  be  on  my  account  seungs  page                    When  I  fill  in  "user_email"  with  "new_email@newplac.es"                    And  I  press  "Change  E-­‐Mail"                    Then  I  should  see  "E-­‐Mail  Changed"                    And  I  follow  the  "confirm_email"  link  from  the  last  sent  email                    Then  I  should  see  "acVvated"                    And  my  "email"  should  be  "new_email@newplac.es"    Behaviour Driven Development
  38. 38. 7 FuncVon   &   IntegraVon     Test  
  39. 39. User Story Level
  40. 40. h-p://www.flickr.com/photos/tubish/4143587047/  Testable
  41. 41. selenium   [səli:niəm]   n.   [化]硒  Web UI Test
  42. 42. 8 101 Acceptance Test      
  43. 43. It’s  Cool,  But     Wrong  Target    Writing right software
  44. 44. 9 ?   Automa(on    
  45. 45. h-p://www.flickr.com/photos/dominik_t/487972901/        Free  hand,  More  fun!    
  46. 46. h-p://www.flickr.com/photos/studebaker_photography/4513247425/sizes/l/in/photostream/        Feedback  Instance  
  47. 47. h-p://www.flickr.com/photos/mac_fun/3751473403/sizes/o/in/photostream/        Safe  Regression  TesVng  
  48. 48. h-p://www.dclab.com/images/books.jpg        Test  as  Document  
  49. 49. h-p://www.china-­‐cloud.com/uploads/allimg/110613/1514053394-­‐0.gif        *RESTful  API  Design  
  50. 50. 10 ?   Automa(on   Tools    
  51. 51. CI  tools  do  automated  builds,  execute  tests,  and  report  the  results   Failing  early  gives  us  (me  to  fix  the  problems   Build & CI
  52. 52. Process
  53. 53. Use  the  whold-­‐team  approach   Adopt  an  agile  tesVng  mind-­‐set   Automate  regression  tesVng   Provide  and  obtain  feedback   Build  a  foundaVon  of  core  pracVces    -­‐  CI  /  Test  Environment  /  Technical  Debt    -­‐  Working  Incrementally   Collaborate  with  customers   Looking  at  the  big  picture  Success Factors
  54. 54. How  we    11 ?   pracVce                              in     School  
  55. 55. Keep  Wai(ng  …  Eric  Zhang  will  show  it  to  us…  
  56. 56. •  h-p://www.365tesVng.com/bbs/thread-­‐31928-­‐1-­‐1.html   •  h-p://www.infoq.com/cn/news/2010/12/dn-­‐agile-­‐test-­‐2  12 •  h-p://www.qualitytree.com/   •  h-p://www.manning.com/osherove/   •  h-p://www.marVnfowler.com/arVcles/mocksArentStubs.html   •  h-p://fitnesse.org/   •  h-p://seleniumhq.org/   •  h-p://agiletesVng.blogspot.com/2009/07/automatedtesVngofproducVon.html   •  h-p://www.tesVng.com/cgi-­‐bin/blog/2003/08/21%23agile-­‐tesVng-­‐project-­‐1   •  h-p://www.extremeprogramming.org/  Resources
  57. 57. ~~ -­‐END-­‐   THANKS  

×