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 ...
随机推荐
- JS sort() 方法
如果调用该方法时没有使用参数,将按字母顺序对数组中的元素进行排序,说得更精确点,是按照字符编码的顺序进行排序.要实现这一点,首先应把数组的元素都转换成字符串(如有必要),以便进行比较. array.s ...
- ajax请求中包含中文参数
对需要传递的中文参数先进行两次转码: 1.js文件中使用encodeURI()方法. var url = "Validate.jsp?id=" + encodeURI(encode ...
- KVM虚拟化环境安装随笔
1. KVM由来 KVM:Kernel-based Virtual Machine 2.软件说明 libvirt 作用:虚拟机的管理软件 virt virt-install virt-clone ...
- idea中git常见使用场景
工作中多人使用版本控制软件协作开发,常见的应用场景归纳如下: 假设小组中有两个人,组长小张,组员小袁 场景一:小张创建项目并提交到远程Git仓库 场景二:小袁从远程Git仓库上获取项目源码 场景三:小 ...
- jsfl 添加代码
var __name=""; var __author=""; var __book=[]; var newJz=""; for(var d ...
- Java中的char占用几个字节
目录 1.概述 2.答疑 3.总结 1.概述 网上或书上都说是Java中的char占用2个字节,一直没有深入,直到接触了编码,才对此产生了疑问,今天来深入一下这个问题. 2.答疑 char在设计之初的 ...
- linux下open-vswitch安装卸载操作
一. ovs 从源码编译安装: 安装依赖项: ? 1 2 3 4 5 6 7 8 9 10 11 # apt install make # apt install gcc # apt install ...
- async:false;渲染阻塞
当我想让一个节点show()完以后再ajax获取数据进行操作: $("#outerdiv2").show(); $.ajax({}): 如果此时ajax里设置了async:fals ...
- ansible自动化
一,工具与环境介绍 1.1 ansible简介 批量管理服务器的工具 无需部署agent,通过ssh进行管理 流行的自动化运维工具:https://github.com/ansible/ansib ...
- 基于springboot的SSM框架实现返回easyui-tree所需要数据
1.easyui-tree easui-tree目所需要的数据结构类型如下: [ { "children": [ { "children": [], " ...