Agenda

  • Benefits
  • Living document
  • Frameworks specflow supports
  • How to integrate it in development cycles
  • Specflow technical features

Benefit -

  1. Provide business readable test cases that can be executed and confirm by product to build confidence that development implemented exactly what business needed(build the right stuffs and built it right).
  2. Giving up using the documenting test cases like traditional plain text that become stale after times, write it in Specflow framework can be well organized and update in time and versioning together with production code.
  3. Ramp up new developer tester quicker by having them understand the test name, test step and related code.

Frameworks specflow supports

  1. Unit Test, Integration Test, API and UI test

Specflow technical features

  1. Feature file Structure

tags can be at feature level or scenario level to indicate special attributes, using symbol @

Header - Provide the feature name (Pretty much like a user story caption)

Scenrio 1 - Provide the scenario

comment can be added at anywhere start with # to add remark

Step 1 - Logical step (Using Given, When, Then, And / But is key word that help improve the readibility)

All are in business language

2. Map the feature file to csharp class and method code

using attributes [given] to map the code back to steps

download specflow extension(generate mapping c# code, Tools->Extension and Updates->Search Specflow Visual Studio Extension), nuget packages(framework that glue the feature with IDE Xunit.Runner.VisualStudio ), nuget test frameworks(Specflow.Xunit nuget)

3. Use scenario outline to organize parameterized inputs and outputs

Scenario Outline: Add numbers

Given I have a new calculator start with <current>

When I have entered <add> into the calculator

Then the result should be <result> on the screen

Examples:

| current | add | result |

| 100     | 20  | 120    |

| 200     | 30  | 230    |

| 234     | 22  | 11     |

namespace POC_LAB_Spec {

[Binding]

public class SpecFlowFeature1Steps

{         Calculator _cal;

[Given(@"I have a new calculator start with (.*)")]

public void GivenIHaveANewCalculatorStartWithCurrent(int current)

{             _cal = new Calculator();             _cal.Current = current;         }

[When(@"I have entered (.*) into the calculator")]

public void WhenIHaveEnteredAddIntoTheCalculator(int add)         {             _cal.Add(add);         }

[Then(@"the result should be (.*) on the screen")]

public void ThenTheResultShouldBeResultOnTheScreen(int result)         {             Assert.True(result == _cal.Current);         }

} }

Acceptance Test - Business Readable Acceptance Test using - Specflow的更多相关文章

  1. Reading Notes of Acceptance Test Engineering Guide

    The Acceptance Test Engineering Guide will provide guidance for technology stakeholders (developers, ...

  2. BVT & BAT (版本验证测试和版本验收测试)

    BVT & BAT 版权声明:本文为博主原创文章,未经博主允许不得转载. 一.BVT: (Build Verification Test ) BVT的概念: BVT(版本验证测试)是在所有开发 ...

  3. USER STORIES AND USE CASES - DON’T USE BOTH

    We’re in Orlando for a working session as part of the Core Team building BABOK V3 and over dinner th ...

  4. software quality assurance 常见问题收录

    1. What is Quality? Quality means, “meeting requirements.” ..Whether or not the product or service d ...

  5. Software development process

    一.Development process 1.Business/User Requirement 2.Architecture Proposal,Solution Proposal 3.Functi ...

  6. pybot/robot命令参数说明

    Robot Framework -- A generic test automation framework Version: 3.0 (Python 3.4.0 on win32) Usage: r ...

  7. 携程apollo系列-客户端集成

    本文讲解如何在 Java 程序中集成 Apollo 配置, 主要涉及到一些基础用法. 对于一些高级用法, 比如如何加密/解密配置项 (可用于数据库密码配置), 如何动态切换数据源地址,如何动态切换日志 ...

  8. BizDevOps — the true value proposition of workflow engines

    转自:https://blog.bernd-ruecker.com/bizdevops-the-true-value-proposition-of-workflow-engines-f342509ba ...

  9. pybot/robot命令参数说明【dos下执行命令pybot.bat --help查看】

    Robot Framework -- A generic test automation framework Version: 3.0 (Python 3.4.0 on win32) Usage: r ...

随机推荐

  1. Python环境下的Sublime Text3无法使用input()函数

    在Sublime Text3中写好Python程序,按Ctrl+B运行程序,在控制台中输入内容,回车,程序没有响应.最后求助网络,找到了解决办法. 一.安装插件SublimeREPL 按Ctrl+Sh ...

  2. mybatis学习1

    一.mybatis步骤 1.根据xml配置文件(全局配置文件)创建一个SqlSessionFactory对象 有数据源一些运行环境信息2.sql映射文件:配置了每一个sql,以及sql的封装规则等. ...

  3. 【手记】MTK之TASK创建及使用

    首先来看看task的数据类型声明,在config\include\hal\task_config.h中对task和module类型进行了定义. /*************************** ...

  4. sphinx-2.1.9的安装使用

    1.下载/编译安装 cd /usr/local/src wget http://sphinxsearch.com/files/sphinx-2.1.9-release.tar.gz tar -xf s ...

  5. 模拟Http请求的几种常用方式

    HttpURLConnection HttpClient JSOUP Nutch 后续补充用法……

  6. C# Excel导入数据

    表 表的创建脚本 CREATE TABLE [dbo].[TB_PROJECTS_New1]( , ) NOT NULL, ) NULL, ) NULL, , ) NULL, , ) NULL, , ...

  7. MVC过滤器使用方法

    先介绍下什么是过滤器:ASP.NET MVC中的灭一个请求,都会分配给相应的控制器和对应的行为方法去处理,而在这些处理的前前后后如果想再加一些额外的逻辑处理,这时就用到了过滤器. MVC支持的过滤器有 ...

  8. mysql访问视图提示:找不到视图

    原因: 1.不存在 2.视图区分大小写(有的不区分) 3.权限问题

  9. WCF基础_使用svcutil.exe 工具来生成调用文件

    右键单击一个服务在浏览器中打开时,通常会有这么一段话: ServiceDemo 服务 已创建服务. 若要测试此服务,需要创建一个客户端,并将其用于调用该服务.可以使用下列语法,从命令行中使用 svcu ...

  10. pyinstaller,scrapy和apscheduler

    一.scrapy拉起方式 1. 简单cmd拉起 from scrapy.cmdline import execute spiders = [ 'scrapy crawl liepin', 'scrap ...