-
Notifications
You must be signed in to change notification settings - Fork 41
Visual Studio Extensions
Page version: 3.x / 2.x
The LightBDD project offers Visual Studio Extension to improve experience of working with LightBDD.
The VSIX extension can be installed from:
- Visual Studio Gallery, or
- directly from Visual Studio via
Tools > Extensions and Updates
, by searching forLightBDD
.
The extensions are available for Visual Studio 2012 and newer.
The Item Templates allows to create a new feature test class for all supported test frameworks.
When used, it will create a partial class consisting of:
-
[feature name].cs
file with feature class attributes ([FeatureDescription]
,[Label]
) and sample scenario methods, -
[feature name].Steps.cs
nested file with step definitions.
Those templates are designed for old csproj formats, where nested files are properly supported.
For new csproj format it is better to create those classes manually and use code snippets for scenario generation.
The Project Templates allows to create new LightBDD projects for all supported test frameworks.
When used, a new project will be created using new csproj format and it will contain:
- package reference to selected LightBDD integration package,
Microsoft.NET.Test.Sdk
and selected test framework, - LightBDD configuration file, such as
ConfiguredLightBddScope.cs
, - sample feature file.
Each project template has a .NET Framework version and .NET Core version if supported.
The extension offers also a set of predefined code snippets to generate scenarios and composite steps.
Here is a list of currently supported snippets:
- Scenario snippets:
- lbscen - scenario (basic and extended syntax),
- lbscena - async scenario (basic and extended syntax),
- lbscenc - contextual scenario,
- lbscenca - async contextual scenario,
- Composite step snippets:
- lbcomp - composite step (basic and extended syntax),
- lbcompa - async composite step (basic and extended syntax),
- lbcompc - contextual composite step,
- lbcompca - async contextual composite step.
The snippets works with plain Visual Studio (i.e. they do not need Resharper to be present).
If Resharper is present however, the snippets can be displayed by pressing: Ctrl+J
.
Each LightBDD snippet name starts with lb
prefix which makes them easy to discover.
When used, they will generate selected code and add all required namespaces for it.
Continue reading: Migrating LightBDD Versions
- What Is New
- Quick Start
- Tests Structure and Conventions
- Scenario Steps Definition
- Composite Steps Definition
- SetUp and TearDown
- DI Containers
- Step parameters
- Test Progress Notification
- Generating Reports
- Execution Time Measurement
- Feature Fixture
- Step Comments
- Step Attachments
- Extending Test Behavior
- Test Utilities
- Test Framework Integrations
- LightBDD Configuration
- Visual Studio Extensions
- How to