Hindsight.Behave 0.2.0

dotnet add package Hindsight.Behave --version 0.2.0
NuGet\Install-Package Hindsight.Behave -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hindsight.Behave" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hindsight.Behave --version 0.2.0
#r "nuget: Hindsight.Behave, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Hindsight.Behave as a Cake Addin
#addin nuget:?package=Hindsight.Behave&version=0.2.0

// Install Hindsight.Behave as a Cake Tool
#tool nuget:?package=Hindsight.Behave&version=0.2.0

More documentation here: http://help.hindsightsoftware.com/bdd-and-the-software-testing-team#test-automation and here: http://help.hindsightsoftware.com/bdd-and-the-software-testing-team/test-automation/specflow-for-visual-studio-and-net

Behave Pro can export the created Feature and Scenarios to any gherkin compatible test automation tool. For Visual Studio/.NET based projects we have a plugin for MSBuild that integrates into the build process. You can use the Behave assembly as an MSBuild task as part of your build process. We host our plugin on the NuGet gallery, and it is available through the NuGet Packet Manager Shell:

Install-Package Hindsight.Behave

Step by step

Short version of using this package:

  1. Install Visual Studio
  2. Create your project
  3. Install SpecFlow for Visual Studio (needed to automatically generate *.cs files from feature files)
  4. Install the Hindsight.Behave, SpecFlow, SpecFlow.NUnit, NUnit, NUnit.Runners and NUnitTestAdapter into your solution via NuGet.
  5. Add the Behave task into your .csproj file. (See Using with MSBuild as a Task section below)
  6. Click Build and the features will be downloaded
  7. Add the features folder into your project via Visual Studio
  8. Use the SpecFlow to autogenerate .cs files.
  9. Run the tests.

Using with MSBuild as a Task

To use with NET Framework, modify your project file (the *.csproj file) by adding the following:

<UsingTask TaskName="Behave" AssemblyFile="$(NuGetPackageRoot)\Hindsight.Behave.0.2.0\lib\net45\Behave.dll" />
<Target Name="BeforeBuild">
  <Behave host="https://behave.pro" project="11500" username="..." password="..." directory="Features\" manual="true" verify="true" nunit="true" />

You can change the ...\lib\net45\... to a different framework version you want to use. The available versions are: net20, net35, net45, net46.

To use with NET Core, modify your project file by adding the following:

<UsingTask TaskName="Behave" AssemblyFile="$(NuGetPackageRoot)\hindsight.behave\0.2.0\lib\netstandard2.0\Behave.dll" />
<Target Name="BeforeBuilds" AfterTargets="Build">
  <Behave host="https://behave.pro" project="11500" username="..." password="..." directory="Features\" manual="true" nunit="true" />

Note: Depending on the project configuration, you will have to change the Target Name="BeforeBuilds"

Note: The $(NuGetPackageRoot) points to the folder where your NuGet packages are stored.

The task has four required parameters, host , project , username and password . These 4 parameters are different depending on if you are using Jira Cloud or Server. You can retrieve the correct details the Jira project's admin area; 'Project Settings' > 'Behave Pro' > 'Generate config'.

Using within a script

If you do not want to use this package as a MSBuild task, you can use the Jira Connector within your own C# code to download features from Behave Pro:

using Hindsight.Behave;

public class Demo
    public void Download()
        JiraConnector jc = new JiraConnector("https://behave.pro");
            // The project id of the target project
            project: "10100",
            // The API Key username
            username: "Cloud userId OR Jira Server Username",
            // The API Key value
            password: "Cloud API key OR Jira Server Password",
            // Directory to extract features to (relative to script)
            directory: "features",
            // Boolean whether to include manual tests
            manual: true,
            // Boolean whether to verify the SSH certificate
            verify: true,
            // Boolean whether to return feature files that
            // are compatible with NUnit.
            isNUnit: true

Running the tests

This package won't run the tests for you, it will only download the feature files for you. To run the feature files, you will need to install SpecFlow for Visual Studio.

Step by step tutorial

For step by step tutorial go here

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net20 is compatible.  net35 is compatible.  net40 was computed.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 7,138 5/4/2018
0.1.8 3,113 10/8/2014
0.1.5 1,349 8/2/2013
0.1.4 1,119 8/2/2013
0.1.3 1,367 1/29/2013
0.1.2 1,240 1/29/2013
0.1.1 1,268 12/11/2012
0.1.0 1,290 12/11/2012

Now compatible with NET Core! Added new releases for netstandard2.0, net35, net45, and net46.