Acceptance Test - Business Readable Acceptance Test using - Specflow
Agenda
- Benefits
- Living document
- Frameworks specflow supports
- How to integrate it in development cycles
- Specflow technical features
Benefit -
- 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).
- 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.
- Ramp up new developer tester quicker by having them understand the test name, test step and related code.
Frameworks specflow supports
- Unit Test, Integration Test, API and UI test
Specflow technical features
- 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的更多相关文章
- Reading Notes of Acceptance Test Engineering Guide
The Acceptance Test Engineering Guide will provide guidance for technology stakeholders (developers, ...
- BVT & BAT (版本验证测试和版本验收测试)
BVT & BAT 版权声明:本文为博主原创文章,未经博主允许不得转载. 一.BVT: (Build Verification Test ) BVT的概念: BVT(版本验证测试)是在所有开发 ...
- 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 ...
- software quality assurance 常见问题收录
1. What is Quality? Quality means, “meeting requirements.” ..Whether or not the product or service d ...
- Software development process
一.Development process 1.Business/User Requirement 2.Architecture Proposal,Solution Proposal 3.Functi ...
- pybot/robot命令参数说明
Robot Framework -- A generic test automation framework Version: 3.0 (Python 3.4.0 on win32) Usage: r ...
- 携程apollo系列-客户端集成
本文讲解如何在 Java 程序中集成 Apollo 配置, 主要涉及到一些基础用法. 对于一些高级用法, 比如如何加密/解密配置项 (可用于数据库密码配置), 如何动态切换数据源地址,如何动态切换日志 ...
- BizDevOps — the true value proposition of workflow engines
转自:https://blog.bernd-ruecker.com/bizdevops-the-true-value-proposition-of-workflow-engines-f342509ba ...
- pybot/robot命令参数说明【dos下执行命令pybot.bat --help查看】
Robot Framework -- A generic test automation framework Version: 3.0 (Python 3.4.0 on win32) Usage: r ...
随机推荐
- sublime text3 离线安装插件方法 package control
package control 在线安装 一般会出现各种错误 不推荐 离线安装 推荐step1: 打开package control官网https://packagecontrol.io/ step2 ...
- 在aspx中,如果要引用一个ID号,需要引用外层的ID号(内层的不行)
- java高并发实战(一)——为什么需要并发
转自:https://blog.csdn.net/gududedabai/article/details/80813592
- websocket的子协议stomp协议
stomp协议Spring实现 服务器注册EndPoint 用来与客户端建立websocket连接 websocket连接的建立应该与客户端与服务器之间的通道无关 jdk中 javax下的websoc ...
- Delphi全局热键的注册
1.在窗启动时创建ATOM;(aatom:ATOM;定义在private中) then begin aatom:=GlobalAddAtom('ZWXhotKey'); end; ) then beg ...
- 拾遗----javascript一些实用方法
1. join() join() 方法用于把数组中的所有元素放入一个字符串.元素是通过指定的分隔符进行分隔的. var ids = []; for(var i = 0 ...
- kinect 深度图与彩色图对齐程序
//#include "duiqi.hpp" #include "kinect.h" #include <iostream> #include &q ...
- form的submit()方法不能触发onsubmit事件的解决方法,兼容各版本浏览器。
在处理表单提交的时候遇到一个问题,通常用<input type="submit" value="提交" />按钮来提交form,再监听form的on ...
- https://github.com/gaoyangxiaozhu/DockerVI
[更新]分享一个开源项目DockerVI,一个基于NodeJS实现的Docker Swarm可视化解决方案
- computer browser服务无法启动 错误1068 依存服务或组无法启动
两台电脑电脑之间传送大文件,发现局域网内共享文件,需要设置文件夹共享,需要开启 Computer Browser服务,而Computer Browser服务项的依存服务项是server服务和works ...