Futile.SpecFlow.Actions.Configuration 0.1.350.7

dotnet add package Futile.SpecFlow.Actions.Configuration --version 0.1.350.7                
NuGet\Install-Package Futile.SpecFlow.Actions.Configuration -Version 0.1.350.7                
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="Futile.SpecFlow.Actions.Configuration" Version="0.1.350.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Futile.SpecFlow.Actions.Configuration --version 0.1.350.7                
#r "nuget: Futile.SpecFlow.Actions.Configuration, 0.1.350.7"                
#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 Futile.SpecFlow.Actions.Configuration as a Cake Addin
#addin nuget:?package=Futile.SpecFlow.Actions.Configuration&version=0.1.350.7

// Install Futile.SpecFlow.Actions.Configuration as a Cake Tool
#tool nuget:?package=Futile.SpecFlow.Actions.Configuration&version=0.1.350.7                

Futile.SpecFlow.Actions.Configuration

Nuget

This SpecFlow.Action is used to read configuration values out of the specflow.actions.json file. You can also provide configurations for multiple targets, to run your scenarios with different configurations.

This SpecFlow.Action is used by every SpecFlow.Action that has a configuration.

Futile?

Work on Specflow has been discontinued and the successor is reqnroll (status May 2024). This nuget package comes from a fork that:

  1. Includes some bug fixes
  2. Uses net48 and net6.0

Updated examples can be found here (Selenium and Playwright support multiple targets): Futile.SpecFlow-Examples.

Included Features

  • Reading configuration values from specflow.actions.json
  • Supports targets via specflow.actions.%TARGET_NAME%.json files.
  • helper classes to read out the configuration values.

Configuration

You can configure this plugin via the specflow.actions.json.

Example:

{
  "your_configuration": "value of the property"
}

Multiple target configurations

This plugin supports tagreting of multiple configurations at runtime. For each configuration you provide, a class will be generated in your feature's code behind file when you build the project. This means that for any given test, the test will be executed against each target.

Example:

specflow.actions.json

{
  "your_configuration": "value of the property",
  "another_configuration": "another value"
}

specflow.actions.TARGET_1.json

{
  "your_configuration": "TARGET 1 overrides this value"
}

specflow.actions.TARGET_2.json

{
  "your_configuration": "TARGET 2 overrides this value"
}
[Binding]
public class A_Binding_Class
{
    private readonly ISpecFlowActionsConfiguration _specFlowActionsConfiguration;

    public A_Binding_Class(ISpecFlowActionsConfiguration specFlowActionsConfiguration)
    {
        _specFlowActionsConfiguration = specFlowActionsConfiguration;
    }

    public string GetConfigurationValue()
    {
        return _specFlowActionsConfiguration.Get("your_configuration", string.Empty);
    }
}

With this configuration, you are getting every scenario twice in your test explorer.

The result of the GetConfigurationValue is the following:

Target Name your_configuration another_configuration
Target_1 TARGET 1 overrides this value another value
Target_2 TARGET 2 overrides this value another value

APIs

ISpecFlowActionsConfiguration

string Get(string path);

Get your configuration value as string. Throws an error if the configuration value doesn't exist.

string Get(string path, string defaultValue);

Get your configuration value as string. If configuration value can't be found, the defaultValue is returned

double? GetDouble(string path);

Get your configuration value as double.

string[] GetArray(string path);

Get your configuration value as a string[]. This is used to get a list from your configuration json file.

Dictionary<string, string> GetDictionary(string path);

Get the child elements of a node in your configuration json file.

How to get it

Add the latest version of the SpecFlow.Actions.Configuration NuGet Package to your project.

Latest version:Nuget

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Futile.SpecFlow.Actions.Configuration:

Package Downloads
Futile.SpecFlow.Actions.WindowsAppDriver

Fork of SpecFlow.Actions.WindowsAppDriver

Futile.SpecFlow.Actions.Playwright

Fork of SpecFlow.Actions.Playwright

Futile.SpecFlow.Actions.Selenium

Fork of SpecFlow.Actions.Selenium

Futile.Specflow.Actions.FlaUI

SpecFlow plugin for FlaUI

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.350.7 115 9/19/2024
0.1.350.6 132 9/14/2024
0.1.350.5 349 10/21/2023