Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Front-end Testing with CasperJS

vitrum.zhu
February 19, 2013

Front-end Testing with CasperJS

Front-end Testing with CasperJS

vitrum.zhu

February 19, 2013
Tweet

Other Decks in Programming

Transcript

  1. •  Old  way  and  new  way   •  About  CasperJS

      •  Unit  Test   •  UI  Test  
  2. •  Headless  browser   •  Based  on  Webkit   • 

    Controllable  by  command  line   •  Full  Javascript  API  
  3. CasperJS •  browsing  naviga,on  steps   •  filling  &  submiRng

     forms   •  capturing  screenshots   •  tes,ng  remote  DOM   •  logging  events   •  downloading  resources   •  wri,ng  func,onal  test  suites,  saving  results                (with  Node.js  we  can  save  results  to  any  format.  Like  XML,  TXT,  JSON)
  4. Quick  Overview Now  run  the  following  in  the  terminal:  

         casperjs  test    duckduck.js You  should  get  something  cool  like  the  following:
  5. CasperJS  @  GLS •  Web  Crawler  (web  page  spider)  

    •  Simula,on  Client  access   •  Help  Barnish  create  cache  before  customer   visit