Behavior-Driven Development (BDD)

Source: Internet
Author: User

Behavior-Driven Development (BDD)

Introduction

BDD is an extension of the TDD concept. BDD emphasizes the involvement of interested technical groups and non-technical teams in the software development process. It can be seen as an agile approach that emphasizes inter-group collaboration. Most teams that adopt some kind of agile approach will eventually follow many of the principles of BDD. When writing unit tests, try to name the tests using the BDD style. The BDD style emphasizes the use of complete, descriptive names or terminology that is easy for business users to understand and avoids the use of technical terminology. BDD expects the names of classes, methods, and variables to reflect everyday language as much as possible.

I. Development environment and TOOLS

1.1 Visual Studio 2013

1.2 Resharp 10.0 or later

1.3 Specflow

Visual Studio menu tools, extensions and updates.

  

Nuget

  

Second, Demand

Enter a clear text, encrypted with DES encryption into ciphertext.

Enter a cipher to decrypt the decrypted form of des into plaintext.

Third, Code Structure

  

Four, add a story or feature file

Modify a Story

Five, Writing test Code

Six, Run the test code

It is recommended that you compile your code before running.

The test was a natural failure because there was no function to implement.

Seven, writing code implementation capabilities

Test Pass

The need for decryption in a similar way.

Eight, Add Requirements

When you enter an empty string, it is encrypted with Des, and an empty string should be returned.

When entering null, the ArgumentNullException should be thrown with DES encryption.

Nine, Add a new story

10. write a new test code

11. run the test code again

When encrypting an empty string, it does not return an empty string and does not match expectations.

When NULL is encrypted, the ArgumentNullException is thrown, which matches the expected.

12. adjust the code to make the encrypted empty string meet the requirements

13. Source Code

Https://github.com/ErikXu/SimpleBDD

14, I GitHub

Https://github.com/ErikXu

Recently want to put their own GitHub business, welcome to exchange more people.

Category: Agile development

Behavior-Driven Development (BDD)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.