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 ...
随机推荐
- 13Linux_vsftpd_Samba_NFS实现文件共享_TFTP
vsftpd服务程序: 匿名开放模式 本地用户模式 虚拟用户模式 简单文件传输协议 TFTP:UDP协议,端口69 TFTP服务使用xinetd服务程序来管理. Samba文件共享服务 NFS网络文件 ...
- 阿里云短信验证使用(PHP)
1.登陆阿里云后台,事先添加签名和模板 2.使用composer下载阿里云SDK composer require alibabacloud/sdk 在PHP7.0下安装需要提前安装curl扩展 -c ...
- TinkPHP框架学习-03模型类
1-----数据访问 2-----数据查询 3-----数据添加 4-----数据修改 5-----数据删除 创建一张nation表并写入三条测试数据 create table nation( `co ...
- pyhon的yileld的一点笔记
yield感觉很神秘,感觉也不好理解,学习pyhon最后终归是要学习这个东西,研究了一段时间,把自己的笔记写下来 说简单点就是遇到yield就停止往下执行代码,也包括不执行yield这条语句,然后返回 ...
- CSS 文字太多用省略号表示
width:150px;/*要显示文字的宽度*/ overflow:hidden; /*超出的部分隐藏起来.*/ white-space:nowrap;/*不显示的地方用省略号...代替*/ text ...
- CodeForces - 864C-Bus-(模拟加油站问题)
https://vjudge.net/problem/CodeForces-864C 题意:两地之间有个加油站,往返走k个单程,最少加油多少次. 大佬几十行代码就解决,我却要用一百多行的if语句模拟解 ...
- [转] ADO.NET调用存储过程带输出参数或返回值
CREATE PROCEDURE [dbo].[GetNameById] @studentid varchar(), @studentname nvarchar() OUTPUT AS BEGIN S ...
- OGRE中Any 类型的实现
[OGRE中Any类型的实现] OGRE中实现了一个class Any,使用Any 可以在上下文中传递任意类型的数据.其本质实现原理就是通过指针. Any 只包含一个成员变量,类型为 placehol ...
- Jmeter Dash Report(HTML Report)删除Hits Per Second graph的方法
通过命令行 Non GUI的方式执行jmeter的jmx脚本可以生成HTML Report(Dash Report). 这个report默认自带了很多种图表报告,比如statistics,Over t ...
- Linux下使用ps命令查看某个进程文件的启动位置
ps -ef|grep shutdown ls -al /proc/4170