2. • TDD
• BDD
• Unit test - mocha
• Integration Test - mocha
• Acceptance Test - super test
• End-to-end Test
• Code coverage reports - Istanbul
• Continuous Integration - travis
• Continuous Delivery - AWS CodePipeline, Solano CI
8. Behavior Driven Development
Format[edit]
A team at Connextra developed the traditional user-story template in 2001:[4]
"As a <role>, I want <goal/desire> so that <benefit>"
Mike Cohn, a well-known author on user stories, regards the "so that" clause as
optional:[5]
"As a <role>, I want <goal/desire>"
9. Behavior Driven Development
Story: User logging in
As a user
I want to login with my details
So that I can get access to the site
Scenario: User uses wrong password
Given a username ‘name’
And a password ‘password’
When the user logs in with username and password
Then the login form should be shown again
10. Behavior Driven Development - 장점
• 비 개발자도 읽을 수 있는 ‘User story’ 기반의 아웃풋
• https://github.com/moltak/node_cucumber_sample
18. Acceptance Test
Acceptance testing seems to be split into two types:
Standard acceptance testing involves performing tests on the full system (e.g. using your web
page via a web browser) to see whether the application's functionality satisfies the specification.
E.g. "clicking a zoom icon should enlarge the document view by 25%." There is no real
continuum of results, just a pass or fail outcome.
Also, in agile software development, user acceptance testing involves creating tests to mirror the
user stories created by/for the software's customer during development. If the tests pass, it
means the software should meet the customer's requirements and the stories can be considered
complete. An acceptance test suite is basically an executable specification written in a domain
specific language that describes the tests in the language used by the users of the system.
http://stackoverflow.com/questions/4904096/whats-the-difference-between-unit-functional-acceptance-and-integration-test
19. End-to-end Test
• 모든 테스트 + 시스템 + 배포
• End user가 서비스 제공자가 제공하는 기능을 제대로 사용할 수 있는지
OS, Container 등 모든 것을 테스트. 빌드, 배포, 웹서비스의 경우에는 웹
서버까지
20. End-to-end Test
End-to-end testing involves ensuring that that integrated components of an application
function as expected. The entire application is tested in a real-world scenario such as
communicating with the database, network, hardware and other applications.
For example, a simplified end-to-end testing of an email application might involve:
• Logging in to the application
• Accessing the inbox
• Opening and closing the mailbox
• Composing, forwarding or replying to email
• Checking the sent items
• Logging out of the application
http://stackoverflow.com/questions/4904096/whats-the-difference-between-unit-functional-acceptance-and-integration-test
21. Code Coverage
• 테스트가 코드를 얼마나 커버하였는가 를 나타내는 지표.
• Statement coverage: 실행 코드라인이 한번 이상 실행
• Function coverage: function (or subroutine)이 한번 이상 실행.
• Condition coverage: if 구문이 true/false 모두 실행 되었을 때.
• Branch coverage: 분기 안의 모든 분기나, 모든 결과에 대해 실행되었을
때.