End-to-end test



TEDxPURPLEWORKS
March 13, 2014

    tdd


    Test-Driven Development

    테스트 주도 개발

    • 기능명세(spec)를 작성하고
    • 테스트 실행 - fail!
    • 기능명세를 구현하고
    • 테스트 실행 - success!!
    • refactoring
    • 반복

    Unit test


    단위 테스트 (unit test )

    • 아주 작은 독립된 기능을 테스트
    • 작고/독립적
    • 코드가 모듈화 되고 깔끔해짐
    • 이걸 수정하면 저게 안되는 상황 방지
    • 프론트엔드보다는 백엔드작업시 유용함

    UNIT TEST sample


    • model
      • Association (관계)
      • Validation (유효성 검증)
      • Instance Mothod
      • Class Method
    • controller
      • request/response

    unit test sample






    ruby on rails rspec 시연

    end-to-end test


    • 시나리오 테스트
    • 실제 UI 테스트
    • 프론트엔드 테스트
    • e2e 테스트라고 함
    • 수정하고 F5누르고 고치고 반복하고
      • 자동화가 필요해!
    • 여러가지 환경이 성숙해짐
      • Selenium /Selenium WebDriver
      • node.js / grunt
      • jasmine
      • ...

    e2e ready!


    • Selenium
      • 브라우져 자동화
    • Selenium WebDriver
      • Selenium Control Interface
    • WebDriverJS
      • node.js용 interface
    • Jasmine(or Mocha)
      • javascript test framework
    • Protractor
      • E2E test framework for Angular App
      • webdriver extention

    Protractor


    • E2E test framework for Angular App
    • webdriver extention
    • use angular's model object
    • wait $http response automatically

    e2e test






    시연

    tdd



    Kent Beck say...
    Agile!!
    Test가 곧 설계

    reference


    • http://docs.seleniumhq.org/
    • http://jasmine.github.io/
    • https://github.com/angular/protractor/blob/master/docs/getting-started.md

    E2E test

    By ChungSub Kim

    E2E test

    • 1,290