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 ...
随机推荐
- c#中委托和事件(转)
C# 中的委托和事件 引言 委托 和 事件在 .Net Framework中的应用非常广泛,然而,较好地理解委托和事件对很多接触C#时间不长的人来说并不容易.它们就像是一道槛儿,过了这个槛的人,觉得真 ...
- Base64图片转Blob对象
//将Base64图片转成Blob对象 //@args: base64Url:编码字符串,contentType:类型. function base64UrltoBlob(base64Url, con ...
- activiti官网实例项目activiti-explorer之扩展多选框回显功能
相关参考链接:https://blog.csdn.net/murongxuesheng/article/details/76147380 回显:确认选中属性ng-model,循环属性ng-repeat ...
- js:上传图片并预览(https://blog.csdn.net/weixin_38023551/article/details/78318532)
1: //filereader 的方法<form action="" enctype="multipart/form-data"> <inpu ...
- Angular开发环境构筑
今天按照下面的顺序构筑了Angular的开发环境.很简单. -- 系统:win7, 64位 1.安装Note 从<https://nodejs.org/ja/>下载安装文件,安装. Not ...
- Longest Palindrome 最长回文串问题
1.题目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum ...
- 不同应用共享redis应用,但分数据库存储数据
日常开发工作中,常常遇到这种情况 项目A ,需要使用redis 项目B ,也需使用redis …… 原来傻乎乎的在服务器上装几个redis,通过不同的端口号来进行使用 其实redis可用有16个数据库 ...
- parallel Stream 学习
首先,我们需要了解下ForkJoinPool.ForkJoin框架是从jdk7中新特性,它同ThreadPoolExecutor一样,也实现了Executor和ExecutorService接口.它使 ...
- ECMAScript 6
参考网上其他帖子,整理如下 ES6 就是ECMAScript 6是新版本JavaScript语言的标准. 增加了如下 Promises Promises是处理异步操作的对象,使用了 Promi ...
- Linux下Samba的安装和使用
一. samba的安装: sudo apt-get insall samba sudo apt-get install smbfs 二. 创建共享目录: mkdir /home/phinecos/sh ...