BDD
행동 기반 개발은 모든 개발 팀과 비즈니스 사이의 대화에 관한 것입니다. 기능 파일과 시나리오는 항상 특정 비즈니스 요구 사항, 기능 또는 기능과 관련이 있어야합니다. 즉, 비즈니스 및 개발 팀이 설명 된 내용을 정확히 이해할 수 있어야합니다.
Feature: Rewards for frequent flyers
As a frequent flyer
I should receive points to my account
So that I am more likely to book with BDD Airlines again in the future
Scenario: I get flyer miles
Given I book a flight
And this flight earns 100 miles
When I land
Then my account should have 100 miles added to it
이 문제는,이 전체 문제를 간략하게 설명 않습니다 또는 필요한 자세한 내용은이 : 예를 들어
? 개발 팀이이 대화를 사용하여 무언가를 만들 수 있습니까 (SBE에 관해서)?
이
Feature: Rewards for frequent flyers
As a frequent flyer
I should receive points to my account
So that I am more likely to book with BDD Airlines again in the future
Scenario: Passenger gets flyer miles
Given the account number 12341234 has a ticket for the "LGW-MAN" flight
And this route earns 100 miles
And the ticket is scanned at "LGW"
When the flight lands at "MAN"
Then the account 12341234 is rewarded 100 miles
Scenario: Passenger missed their flight
Given the account number 12341234 has a ticket for the "LGW-MAN" flight
And this route earns 100 miles
And the ticket is not scanned at "LGW"
When the flight lands at "MAN"
Then the account 12341234 is not rewarded any miles
Scenario: Passenger gets kicked off the plane
Given the account number 12341234 has a ticket for the "LGW-MAN" flight
And this route earns 100 miles
And the ticket is scanned at "LGW"
But the ticket is removed from the flight
When the flight lands at "MAN"
Then the account 12341234 is not rewarded any miles
그것은 모든 선명도에 대해, 그리고 시스템의 행동이 비즈니스에 관련하여 설명하는 방법에 대한 일반적으로 더 나은? 될 것이다.
귀하의 예
개인적으로 사업이 사용 된 모든 구성 요소의 구현에 관심을 안 등의 진행률 표시 줄을 테스트하기위한 목적으로 시나리오를 작성하지 것이다
(그들은 상관 없어 로딩 바에 관해서는 정보가 실제로로드된다는 사실을주의하십시오.)
제 생각에는 단위 테스트로 더 좋을 것입니다.
카일 (Kyle) 안녕하십니까. 당신의 예가 도움이되고 제 시나리오가 실제로 사업상의 목적이 아니라는 것을 이해합니다. @Lunivore가 제안했듯이, 나는 이것을 더 낮은 레벨의 테스트로 만들고 GWT를 코멘트로 변환 할 것이다. 당신의 예제에 대한 하나의 질문 : '그러면 LGW에서 티켓을 스캔하지 않아야합니다.'그리고 'And'대신 'But'로 시작해야합니까? –
"And"또는 "But"둘 중 하나 일 수 있습니다. 그러나 당신이 그것을 말한 후에, 나의 본능은 그것이 긍정적 인 것보다는 부정적인 전제 조건을 언급하고 있기 때문에 그것을 단지 'But'로 바꾸라고 말하고 있습니다. 'And' &'But'를 사용할 때 정말 기본 설정에 관한 것입니다. –