Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Install SpecFlow and the SpecFlow+ Runner 1.7.2 or newer along with the msbuild helper package; If you're using Visual Studio, just go to NuGet's Console  (Tools | NuGet Package Manager | Package Manager Console)
    • Install-Package SpecRun.SpecFlow
    • Install-Package SpecRun.SpecRun
    • Install-Package SpecFlow.Tools.MsBuild.Generation
  • Use the CucumberJson.cshtml report template provided in this page

...

The created file will be similar to the following: 


Code Block
languagexml
titlepackages.config
collapsetrue



Code Block
title1_CALC-889.feature
@CALC-2250
@REQ_CALC-2247
Feature: Sum Operation
	#In order to avoid silly mistake
	#
	#As a math idiot
	#
	#I want to be told the sum of two numbers

	
	@TEST_CALC-2249
	Scenario Outline: Add two positive numbers
			Given I have entered <input_1> into the calculator
			And I have also entered <input_2> into the calculator
			When I press <button>
			Then the result should be <output> on the screen
			
			  Examples:
			    | input_1 | input_2 | button | output |
			    | 20      | 30      | add    | 50     |
			    | 2       | 5       | add    | 7      |
			    | 0       | 40      | add    | 40     | 
			    | 4       | 50      | add    | 54     | 
			    | 5       | 50      | add    | 55     | 	

	
	@TEST_CALC-2248
	Scenario: add two numbers
			Given I have entered 50 into the calculator
			And I have also entered 70 into the calculator
			When I press add
			Then the result should be 120 on the screen	

	
	@TEST_CALC-2251
	Scenario Outline: add two negative numbers
		Given I have entered <input_1> into the calculator
		And I have also entered <input_2> into the calculator
		When I press <button>
		Then the result should be <output> on the screen
					
			Examples:
			| input_1 | input_2 | button | output |
			| -1      | -2      | add    | -3     |
			| 1       | -1      | add    | 0      |

...