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
<PackageReference Include="ExecuteAutomation.Reqnroll.Dynamics" Version="1.1.2" />
<PackageVersion Include="ExecuteAutomation.Reqnroll.Dynamics" Version="1.1.2" />
<PackageReference Include="ExecuteAutomation.Reqnroll.Dynamics" />
paket add ExecuteAutomation.Reqnroll.Dynamics --version 1.1.2
#r "nuget: ExecuteAutomation.Reqnroll.Dynamics, 1.1.2"
#:package ExecuteAutomation.Reqnroll.Dynamics@1.1.2
#addin nuget:?package=ExecuteAutomation.Reqnroll.Dynamics&version=1.1.2
#tool nuget:?package=ExecuteAutomation.Reqnroll.Dynamics&version=1.1.2
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 (
_) placeholdervar 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
- Basic:
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 | Versions 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. |
-
net8.0
- AutoFixture (>= 4.18.1)
- Dynamitey (>= 3.0.3)
- Reqnroll (>= 2.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
First Release of Reqnroll with Dynamic table supports