2014-12-02 82 views
0

对于我们的项目,开发团队遵循TDD方法。但BA的书写作为一个例子用于UI自动化的Specflow

的格式相同的用户故事:匿名用户(ACUST) 我想要的:按颜色 使过滤我的搜索结果:我只能看到产品,我喜欢的颜色

如果BA以更加通用的格式编写用户故事,开发人员会将用户故事分为多个故事。我们的手动测试人员在给定自动化测试人员(我们)自动化的情况下编写测试用例。

作为自动化测试人员,我们将SBI的测试案例与其相关联。

现在我们使用SpecFlow-Selenium来使用PageObject模式自动化我们的测试用例。并将使用MTM将测试脚本与测试案例相关联,并从MTM运行它们。

我们现在应该如何处理上述情况,我们应该如何在specflow中创建我们的场景和特性文件?

任何信息都会很棒。

回答

1

你应该像快乐的场景开始: (你也可以使用“场景提纲”,而不是“常规方案”)

Feature: filter results page of "Anonymous Customer" 
     In order to help anonymous customers to find what their looked for 
     As a anonymous customer I want be able to filter my search results 

BACKGROUND: 
GIVEN i am an Anonymous Customer 
AND i am at search results page 

SCENARIO: customer filter results by color 
GIVEN the page contains the following items: 
     | product name | color | 
     | name1  | blue | 
     | etc....  | etc.. | 
WHEN i filter results by <color X> (for example "blue") 
THEN i should see the following items: <verify existence for the following items> 
     | product name  | 
     | name1    | 
     | other blue items...| 

然后就可以开始的“坏情况”检查的行为只有在它们是重要的(这取决于运行的时间,金钱和等),例如:

scenario: customer change the filter color 
scenario: customer remove all filters 
scenario: etc... 

任何方式,从你的描述看来,测试人员没有突破这个故事到验收标准