Use cases sequentialy related, how to deal with this?

I’ll express my doubt with an example. Suppose I have the following requirement:

The customer needs a page in his website that displays all the products he has with a quantity field on the side of each product. The visitor of the website must be able to fill in the quantities desired, select one location and ask for the budgeting. After asking for the budgeting, the visitor must be taken to a page with the summary of the products asked, together with the prices and fields to fill in contact informations to proceed the negotiation if desired

To organize this I’ve decided on building two use cases: “Require budgeting” and “Ask for products”. The first one is:

Title: Require budgeting

Actor: Website visitor

Scenario:

  • The visitor selects to see the products

  • While the visitor want to add products to the budgeting

    • The visitor fills the desired quantity of a product in the corresponding field
  • The visitor selects his location to estimate shipping price

  • The visitor sends the requirement

After that, the visitor will be redirected to the page with the information about what he asks and the fields to require the products. This is another use case, but there is a close connection with the first one, because it is in the sequnce. I didn’t know exactly how to deal with this. So I thought of using precondition:

Title: Ask for products

Actor: Website visitor

Precondition: the visitor has asked for a budgeting

Scenario:

  • The visitor reviews the products and prices

  • If he wants to ask for the products

    • The visitor fills his contact information and sends to the sales department
  • If not, he exits the page

But I’m unsure this is the right way to do so, I think that “extension” was the right way to express that, but I think I didn’t get this yet.

How should we proceed when use cases are closely related like that?

The way I see it, you can argue two ‘right’ ways of doing this: A) the whole thing is one large use case (primarily considering the ‘ask for products’ case to be the dominant one you’re writing for), or B) the way you’ve got set up, where you have a short case for each atomic action (requiring budgeting, asking for products), and specifying a precondition where necessary (asking for products requires that budgeting already exists, which requires other stuff, etc.)

If I had to implement this using something like SpecFlow, keeping it the way you’ve posted is beneficial because I can do something like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department
</code>
<code>Given the user has added budgeting And the user views Review Products & Pricing When the user enters their contact information Then a request is sent to the sales department </code>
Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department

…The first given step would likely be a call-forward macro for that first story, whcih would probably be written as such:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved
</code>
<code>Given the user views Manage Budgeting When the user requests Item [X] in Quantity [Y] Then the requirement is saved </code>
Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved

The ability to do it like this, in my opinion validates how you organized these two related test cases.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Use cases sequentialy related, how to deal with this?

I’ll express my doubt with an example. Suppose I have the following requirement:

The customer needs a page in his website that displays all the products he has with a quantity field on the side of each product. The visitor of the website must be able to fill in the quantities desired, select one location and ask for the budgeting. After asking for the budgeting, the visitor must be taken to a page with the summary of the products asked, together with the prices and fields to fill in contact informations to proceed the negotiation if desired

To organize this I’ve decided on building two use cases: “Require budgeting” and “Ask for products”. The first one is:

Title: Require budgeting

Actor: Website visitor

Scenario:

  • The visitor selects to see the products

  • While the visitor want to add products to the budgeting

    • The visitor fills the desired quantity of a product in the corresponding field
  • The visitor selects his location to estimate shipping price

  • The visitor sends the requirement

After that, the visitor will be redirected to the page with the information about what he asks and the fields to require the products. This is another use case, but there is a close connection with the first one, because it is in the sequnce. I didn’t know exactly how to deal with this. So I thought of using precondition:

Title: Ask for products

Actor: Website visitor

Precondition: the visitor has asked for a budgeting

Scenario:

  • The visitor reviews the products and prices

  • If he wants to ask for the products

    • The visitor fills his contact information and sends to the sales department
  • If not, he exits the page

But I’m unsure this is the right way to do so, I think that “extension” was the right way to express that, but I think I didn’t get this yet.

How should we proceed when use cases are closely related like that?

The way I see it, you can argue two ‘right’ ways of doing this: A) the whole thing is one large use case (primarily considering the ‘ask for products’ case to be the dominant one you’re writing for), or B) the way you’ve got set up, where you have a short case for each atomic action (requiring budgeting, asking for products), and specifying a precondition where necessary (asking for products requires that budgeting already exists, which requires other stuff, etc.)

If I had to implement this using something like SpecFlow, keeping it the way you’ve posted is beneficial because I can do something like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department
</code>
<code>Given the user has added budgeting And the user views Review Products & Pricing When the user enters their contact information Then a request is sent to the sales department </code>
Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department

…The first given step would likely be a call-forward macro for that first story, whcih would probably be written as such:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved
</code>
<code>Given the user views Manage Budgeting When the user requests Item [X] in Quantity [Y] Then the requirement is saved </code>
Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved

The ability to do it like this, in my opinion validates how you organized these two related test cases.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Use cases sequentialy related, how to deal with this?

I’ll express my doubt with an example. Suppose I have the following requirement:

The customer needs a page in his website that displays all the products he has with a quantity field on the side of each product. The visitor of the website must be able to fill in the quantities desired, select one location and ask for the budgeting. After asking for the budgeting, the visitor must be taken to a page with the summary of the products asked, together with the prices and fields to fill in contact informations to proceed the negotiation if desired

To organize this I’ve decided on building two use cases: “Require budgeting” and “Ask for products”. The first one is:

Title: Require budgeting

Actor: Website visitor

Scenario:

  • The visitor selects to see the products

  • While the visitor want to add products to the budgeting

    • The visitor fills the desired quantity of a product in the corresponding field
  • The visitor selects his location to estimate shipping price

  • The visitor sends the requirement

After that, the visitor will be redirected to the page with the information about what he asks and the fields to require the products. This is another use case, but there is a close connection with the first one, because it is in the sequnce. I didn’t know exactly how to deal with this. So I thought of using precondition:

Title: Ask for products

Actor: Website visitor

Precondition: the visitor has asked for a budgeting

Scenario:

  • The visitor reviews the products and prices

  • If he wants to ask for the products

    • The visitor fills his contact information and sends to the sales department
  • If not, he exits the page

But I’m unsure this is the right way to do so, I think that “extension” was the right way to express that, but I think I didn’t get this yet.

How should we proceed when use cases are closely related like that?

The way I see it, you can argue two ‘right’ ways of doing this: A) the whole thing is one large use case (primarily considering the ‘ask for products’ case to be the dominant one you’re writing for), or B) the way you’ve got set up, where you have a short case for each atomic action (requiring budgeting, asking for products), and specifying a precondition where necessary (asking for products requires that budgeting already exists, which requires other stuff, etc.)

If I had to implement this using something like SpecFlow, keeping it the way you’ve posted is beneficial because I can do something like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department
</code>
<code>Given the user has added budgeting And the user views Review Products & Pricing When the user enters their contact information Then a request is sent to the sales department </code>
Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department

…The first given step would likely be a call-forward macro for that first story, whcih would probably be written as such:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved
</code>
<code>Given the user views Manage Budgeting When the user requests Item [X] in Quantity [Y] Then the requirement is saved </code>
Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved

The ability to do it like this, in my opinion validates how you organized these two related test cases.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Use cases sequentialy related, how to deal with this?

I’ll express my doubt with an example. Suppose I have the following requirement:

The customer needs a page in his website that displays all the products he has with a quantity field on the side of each product. The visitor of the website must be able to fill in the quantities desired, select one location and ask for the budgeting. After asking for the budgeting, the visitor must be taken to a page with the summary of the products asked, together with the prices and fields to fill in contact informations to proceed the negotiation if desired

To organize this I’ve decided on building two use cases: “Require budgeting” and “Ask for products”. The first one is:

Title: Require budgeting

Actor: Website visitor

Scenario:

  • The visitor selects to see the products

  • While the visitor want to add products to the budgeting

    • The visitor fills the desired quantity of a product in the corresponding field
  • The visitor selects his location to estimate shipping price

  • The visitor sends the requirement

After that, the visitor will be redirected to the page with the information about what he asks and the fields to require the products. This is another use case, but there is a close connection with the first one, because it is in the sequnce. I didn’t know exactly how to deal with this. So I thought of using precondition:

Title: Ask for products

Actor: Website visitor

Precondition: the visitor has asked for a budgeting

Scenario:

  • The visitor reviews the products and prices

  • If he wants to ask for the products

    • The visitor fills his contact information and sends to the sales department
  • If not, he exits the page

But I’m unsure this is the right way to do so, I think that “extension” was the right way to express that, but I think I didn’t get this yet.

How should we proceed when use cases are closely related like that?

The way I see it, you can argue two ‘right’ ways of doing this: A) the whole thing is one large use case (primarily considering the ‘ask for products’ case to be the dominant one you’re writing for), or B) the way you’ve got set up, where you have a short case for each atomic action (requiring budgeting, asking for products), and specifying a precondition where necessary (asking for products requires that budgeting already exists, which requires other stuff, etc.)

If I had to implement this using something like SpecFlow, keeping it the way you’ve posted is beneficial because I can do something like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department
</code>
<code>Given the user has added budgeting And the user views Review Products & Pricing When the user enters their contact information Then a request is sent to the sales department </code>
Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department

…The first given step would likely be a call-forward macro for that first story, whcih would probably be written as such:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved
</code>
<code>Given the user views Manage Budgeting When the user requests Item [X] in Quantity [Y] Then the requirement is saved </code>
Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved

The ability to do it like this, in my opinion validates how you organized these two related test cases.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Use cases sequentialy related, how to deal with this?

I’ll express my doubt with an example. Suppose I have the following requirement:

The customer needs a page in his website that displays all the products he has with a quantity field on the side of each product. The visitor of the website must be able to fill in the quantities desired, select one location and ask for the budgeting. After asking for the budgeting, the visitor must be taken to a page with the summary of the products asked, together with the prices and fields to fill in contact informations to proceed the negotiation if desired

To organize this I’ve decided on building two use cases: “Require budgeting” and “Ask for products”. The first one is:

Title: Require budgeting

Actor: Website visitor

Scenario:

  • The visitor selects to see the products

  • While the visitor want to add products to the budgeting

    • The visitor fills the desired quantity of a product in the corresponding field
  • The visitor selects his location to estimate shipping price

  • The visitor sends the requirement

After that, the visitor will be redirected to the page with the information about what he asks and the fields to require the products. This is another use case, but there is a close connection with the first one, because it is in the sequnce. I didn’t know exactly how to deal with this. So I thought of using precondition:

Title: Ask for products

Actor: Website visitor

Precondition: the visitor has asked for a budgeting

Scenario:

  • The visitor reviews the products and prices

  • If he wants to ask for the products

    • The visitor fills his contact information and sends to the sales department
  • If not, he exits the page

But I’m unsure this is the right way to do so, I think that “extension” was the right way to express that, but I think I didn’t get this yet.

How should we proceed when use cases are closely related like that?

The way I see it, you can argue two ‘right’ ways of doing this: A) the whole thing is one large use case (primarily considering the ‘ask for products’ case to be the dominant one you’re writing for), or B) the way you’ve got set up, where you have a short case for each atomic action (requiring budgeting, asking for products), and specifying a precondition where necessary (asking for products requires that budgeting already exists, which requires other stuff, etc.)

If I had to implement this using something like SpecFlow, keeping it the way you’ve posted is beneficial because I can do something like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department
</code>
<code>Given the user has added budgeting And the user views Review Products & Pricing When the user enters their contact information Then a request is sent to the sales department </code>
Given the user has added budgeting
And the user views Review Products & Pricing
When the user enters their contact information
Then a request is sent to the sales department

…The first given step would likely be a call-forward macro for that first story, whcih would probably be written as such:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved
</code>
<code>Given the user views Manage Budgeting When the user requests Item [X] in Quantity [Y] Then the requirement is saved </code>
Given the user views Manage Budgeting
When the user requests Item [X] in Quantity [Y]
Then the requirement is saved

The ability to do it like this, in my opinion validates how you organized these two related test cases.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật