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 docker 多进程提供 稳定tensorflow gpu 线上服务

    尝试了太多的python多进程的服务,在tensorflow 的线上GPU服务中总是不理想.tensorlfow serving docker服务这些也有些不便. 今天抽空给大家分享一个成功的经验.失 ...

  2. react-native-table-component, react-native 表格

    使用 react-native-table-component, 加上 FlatList 组件,实现可以下拉刷新,上拉加载的demo import React, { Component } from ...

  3. js:一些基础

    JavaScript 基础(一)   JavaScript的引入方式 直接编写 <!DOCTYPE html> <html lang="en"> <h ...

  4. register关键字

    register关键字从c++11开始已经弃用了,但是在看SuRF代码(https://www.cnblogs.com/YuNanlong/p/10235793.html) 的时候,还是看到了这个关键 ...

  5. Dear Menuhin

    2017-11-26 Sa Nov 11:05 AM @ HOME, TOSBE Nicole assigned us a composition about the Thanksgiving day ...

  6. CentOS中wget安装

    通过linux text最小化安装或者安装Basic Server版本后出现的问题是wget命令不能使用了,这时可以使用rpm命令来安装wget.方法一.网络安装    rpm -ivh http:/ ...

  7. 代码详解:TensorFlow Core带你探索深度神经网络“黑匣子”

    来源商业新知网,原标题:代码详解:TensorFlow Core带你探索深度神经网络“黑匣子” 想学TensorFlow?先从低阶API开始吧~某种程度而言,它能够帮助我们更好地理解Tensorflo ...

  8. HTML5代码段

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  9. 使用vue-cli@3启动elementui脚手架

    [vue3.x] 准备看elementui的源码,早上拉elementui提供的脚手架代码,于是下载了vue3.x(之前一直用2.x) 1.先把vue2.x卸载了 npm uninstall -g v ...

  10. 解析ReentrantLock实现原理

    在Java中通常实现锁有两种方式,一种是synchronized关键字,另一种是Lock(Lock的实现主要有ReentrantLock.ReadLock和WriteLock).synchronize ...