LightBDD.ScenarioSync.Cli 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global LightBDD.ScenarioSync.Cli --version 1.0.2                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local LightBDD.ScenarioSync.Cli --version 1.0.2                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=LightBDD.ScenarioSync.Cli&version=1.0.2                
nuke :add-package LightBDD.ScenarioSync.Cli --version 1.0.2                

The Light BDD test framework scenarios import tool for Azure DevOps

To learn more, please see LightBDD.ScenarioSync wiki pages, or jump straight to:

Project description

ScenarioSync and LightBDD framework is a good alternative to SpecSync and SpecFlow framework.
ScenarioSync for Azure DevOps, integrates the BDD process with Azure DevOps by connecting and synchronizing the LightBDD scenarios with Test Cases. ScenarioSync use LightBDD labels with "Relations:" metadata to assign Scenarios to Related Work Items in Azure DevOps. Labels with "Sync:" metadata uses to link Scenario method to Test Case Associated Automation, that relation allow to run Automated Test Cases directly from Azure Devops Test Plan during release. This way of the development reduce time spend to maintain actuality of scenarios in code and Azure DevOps. ScenarioSync works similar to SpecSync but uses LightBDD FeaturesReport.xml file as a source and base on it import Test suites and Test cases to Azure DevOps, Test suites and Test cases that not in source report removed from Azure DevOps.

Light BDD to Azure DevOps Test Plan features mapping

LightBDD Azure DevOps Test Plan Notes
Feature Test Suite Created as Test Suite
Feature Description Test Suite Description Saving to Test Suite Description
Scenario Test Case Created as Test Case
Scenario Test Case Summary Saving as text rendered copy to Test Case description
Scenario Steps Test Case Steps Created as Test Case Steps
Step File Attachment Step Attachment Created Step Attachment
Step Table parameter Step Parameters Not support Azure DevOps parameters, Saving as a text table in a step title
Step Tree parameter X Saving as a text in a step title
Categories Tags Saving as Tags
Labels Tags Saving as Tags
Comment X Saving to Test Case Description
Step parameter expectation expressions Step Expected Result Saving as Test case step expected result
Step parameter expectation expressions Step Expected Result Saving as Test case step expected result
X Configurations Mapping not supported, can be applied to Static or Query based test suite
Labels (Relations:) Related Work Use Label attribute with text 'Relations:'
Labels (Sync:) Associated Automation Use Label attribute with text 'Sync:'

Example

Use Getting Started to install and run import tool

Light BDD Scenario

Example copied from Demo project Contacts_management.cs.
To assign scenario to related User Story or Task RelationsAttribute attribute could be used. To include scenario to synchronization use SyncAttribute.

[Scenario]
[Label("Test-label")]
[Relations(234, 235)]
[Sync(nameof(Contacts_management), nameof(Searching_for_contacts_by_phone))]
// [Label("Relations:230,235")]
// [Label("Sync:Demo.LightBDD.XUnit2.dll;Demo.LightBDD.XUnit2.Features.Contacts_management.Searching_for_contacts_by_phone")]
public void Searching_for_contacts_by_phone()
{
    Runner.WithContext<ContactsManagementContext>().RunScenario(
        c => c.Given_my_contact_book_is_empty(),
        c => c.Given_I_added_contacts(Table.For(
            new Contact("John", "111-222-333", "john@hotmail.com"),
            new Contact("John", "111-303-404", "jo@hotmail.com"),
            new Contact("Greg", "213-444-444", "greg22@gmail.com"),
            new Contact("Emily", "111-222-5556", "emily1@gmail.com"),
            new Contact("Kathy", "111-555-330", "ka321@gmail.com"))),
        c => c.When_I_search_for_contacts_by_phone_starting_with("111"),
        c => c.Then_I_should_receive_contacts(Table.ExpectData(
            b => b.WithInferredColumns()
                .WithKey(x => x.Name),
            new Contact("Emily", "111-222-5556", "emily1@gmail.com"),
            new Contact("John", "111-222-333", "john@hotmail.com"),
            new Contact("John", "111-303-404", "jo@hotmail.com"),
            new Contact("Kathy", "111-555-330", "ka321@gmail.com")
        )));
}

Azure DevOps Test Case

test-case-demo.png

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.4 345 8/15/2023
1.0.3 274 8/15/2023
1.0.2 291 8/14/2023
1.0.1 339 8/14/2023
1.0.0 294 8/14/2023