【发布时间】:2016-09-15 02:42:03
【问题描述】:
在一个项目中,我们使用 BDD 来编写规范。在需求中,用户必须在使用之前正确配置系统。
- 此配置涉及在计算机和移动设备之间复制密钥文件。
- 在启动移动应用程序时,它会提示用户导入密钥文件。
- 如果不进行导入,用户将无法使用移动应用程序。因此,移动应用内的所有未来操作都将取决于密钥文件的可用性。
我的问题是,以下故事在 BDD 中是否有效? -
Title:- Configure mobile application for first time use
Narrative:-
As a:- System,
I want:- to have the same secret key available on both the participating devices
So that:- I use the correct key to encrypt and decrypt text using symmetric encryption algorithm on the participating devices
Scenarios:- Scenario 1
Given:- I have a secret key generated and available in the computer
When:- I have finished installing the application in mobile device
Then:- I expect the user to perform following steps -
1. Copy the secret key file from the computer
2. Paste the secret key file in the mobile device where the application is installed
Scenario 2
Given:- I have a secret key generated and available in the computer
When:- User cancelled the configuration step
Then:- I should prompt the user with message - "App requires the secret key configuration to work!"
我已经在 SO Writing user stories for internal technical tasks 中阅读了这篇文章,其中明确指出系统不能成为故事中的角色。但是对于我的系统期望用户正确配置应用程序的场景,我可以不使用系统的角色吗?
我们确实考虑过系统自行移动密钥的可能性,即自动移动到其他设备。但是,由于其他技术原因,这被拒绝了,客户不希望这种情况自动发生。
【问题讨论】:
标签: bdd user-stories