ExecuteAutomation.Reqnroll.Dynamics 1.1.2

dotnet add package ExecuteAutomation.Reqnroll.Dynamics --version 1.1.2
                    
NuGet\Install-Package ExecuteAutomation.Reqnroll.Dynamics -Version 1.1.2
                    
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="ExecuteAutomation.Reqnroll.Dynamics" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExecuteAutomation.Reqnroll.Dynamics" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="ExecuteAutomation.Reqnroll.Dynamics" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ExecuteAutomation.Reqnroll.Dynamics --version 1.1.2
                    
#r "nuget: ExecuteAutomation.Reqnroll.Dynamics, 1.1.2"
                    
#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.
#:package ExecuteAutomation.Reqnroll.Dynamics@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ExecuteAutomation.Reqnroll.Dynamics&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=ExecuteAutomation.Reqnroll.Dynamics&version=1.1.2
                    
Install as a Cake Tool

ExecuteAutomation.Reqnroll.Dynamics

A powerful library that enhances Reqnroll with dynamic data handling capabilities for BDD testing.

Features

Core Table Handling

  • Dynamic Object Creation: Convert tables to dynamic objects

    var data = table.CreateDynamicInstance();
    
  • Dynamic Set Creation: Convert tables to collections of dynamic objects

    var items = table.CreateDynamicSet();
    
  • Comparison: Compare tables with dynamic objects or collections

    table.CompareToDynamicInstance(instance);
    table.CompareToDynamicSet(set);
    
  • Table Transformations: Transform vertical tables to horizontal and filter/project table data

    var horizontal = CreateHorizontalTable(verticalTable);
    var filtered = table.FilterRows(row => row["Status"] == "Active");
    var projected = table.SelectColumns("FirstName", "LastName");
    
  • Nested Objects: Create hierarchical objects from tables with JSON data

    var nestedObject = table.CreateNestedDynamicInstance();
    

AutoFixture Integration

  • Random Data Generation: Create tables with auto-generated test data

    Given users with the following details:
      | Username    | Email      | DateOfBirth | PhoneNumber |
      | auto.string | auto.email | auto.date   | auto.phone  |
      | _           | _          | _           | _           |
    
  • Type Inference: Automatic type detection from column names using underscore (_) placeholder

    var userSet = table.CreateDynamicSetWithAutoFixture();
    
  • Supported Data Types:

    • Basic: string, int, decimal, double, bool, guid
    • Date/Time: date, datetime, timespan
    • Personal: email, name, firstname, lastname
    • Contact: phone, address, city, zipcode/postalcode, country
    • Web: url/uri
    • Payment: creditcard
    • Collections: stringlist, intlist, guidlist, datelist
  • Custom Entity Generation: Register your own domain entity generators

    AutoFixtureTableExtensions.RegisterEntityType<User>("user");
    AutoFixtureTableExtensions.RegisterEntityGenerator<PremiumUser>("premium-user", 
      () => new PremiumUser { Level = "Gold" });
    
  • Batch Entity Creation: Generate multiple entities at once

    var users = AutoFixtureTableExtensions.CreateEntities("User", 5);
    

Async Support

All core methods provide async versions for better performance:

// Async dynamic objects
var instance = await table.CreateDynamicInstanceAsync();
var set = await table.CreateDynamicSetAsync();

// Async comparison
await table.CompareToDynamicInstanceAsync(instance);
await table.CompareToDynamicSetAsync(set);

// Async table transformations
var filtered = await table.FilterRowsAsync(predicate);
var projected = await table.SelectColumnsAsync("Name", "Email");
var nested = await table.CreateNestedDynamicInstanceAsync();

// Async AutoFixture integration
var autoInstance = await table.CreateDynamicInstanceWithAutoFixtureAsync();
var autoSet = await table.CreateDynamicSetWithAutoFixtureAsync();
var entities = await AutoFixtureTableExtensions.CreateEntitiesAsync("User", 5);

Installation

# Package Manager
Install-Package ExecuteAutomation.Reqnroll.Dynamics

# .NET CLI
dotnet add package ExecuteAutomation.Reqnroll.Dynamics

# PackageReference
<PackageReference Include="ExecuteAutomation.Reqnroll.Dynamics" Version="1.1.2" />

Common Examples

Mixed Specific and Random Data

Given I have the following users
  | FirstName | LastName | Email      | Age      | IsActive |
  | John      | Smith    | auto.email | auto.int | true     |
  | _         | _        | _          | 25       | false    |

Form Submissions with Random Data

When I submit the form with the following data
  | Username    | Password    | ConfirmPassword | DateOfBirth | TermsAccepted |
  | auto.string | auto.string | {Password}      | auto.date   | true          |

Testing Data Tables with Multiple Random Entries

Given the database contains the following products
  | ProductName | Category | Price       | StockLevel | LastUpdated    |
  | _           | _        | auto.double | auto.int   | auto.datetime  |
  | _           | _        | auto.double | auto.int   | auto.datetime  |

Using Collection Types

Given I have a product with the following details
  | Name        | Price        | Tags           | RelatedProductIds |
  | auto.string | auto.decimal | auto.stringlist| auto.intlist      |

License

This project is licensed under the MIT License.

Acknowledgments

This project is a fork of Specflow.Assist.Dynamics with enhancements for Reqnroll.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.2 19,975 4/16/2025
1.1.1 10,523 4/16/2025
1.1.0 283 4/15/2025
1.0.0 5,587 1/15/2025

First Release of Reqnroll with Dynamic table supports