-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement event-based progress notification to replace IScenarioNotifier / IFeatureNotifier #225
Comments
…nd related types Updated all code to use IProgressNotifier implementations instead
The IProgressNotifier interface has been introduced and replaced IScenarioProgressNotifier and IFeatureProgressNotifier. Unlike previous interfaces IProgressNotifier has only one method: public interface IProgressNotifier
{
void Notify(ProgressEvent e);
} It is used now to send notifications about all events happening during test execution, where RegistrationWhile all existing notifiers (DefaultProgressNotifier, NoProgressNotifier, ParallelProgressNotifierProvider) have been updated to support the new interface, they need to be registered using new configuration section: configuration.ProgressNotifierConfiguration()
.Clear()
.Append(new DefaultProgressNotifier(Console.WriteLine)); While it was possible to create IScenarioProgressNotifier for the specific scenario, all IProgressNotifier instances are created at once and used for all fixtures and scenarios. In order to get access to fixture specific outputs, the ScenarioExecutionContext can be used: configuration.ProgressNotifierConfiguration()
.Clear()
.Append(new DefaultProgressNotifier(message => ScenarioExecutionContext
.GetCurrentScenarioFixtureIfPresent<ITestOutputProvider>()
?.TestOutput
.WriteLine(message))); Please note that This use case may get simplified before the release, but if anything, it will get implemented in separate ticket Benefits of the new approachThe main benefit is that LightBDD can now get extended to provide more notifications without breaking the interfaces and requiring all implementations to handle all notifications. |
#260 (LightBDD.MsTest2)(Change) Updated MSTest.TestFramework to 2.2.10 #260 (LightBDD.NUnit3)(Change) Updated NUnit dependency to 3.13.3 #260 (LightBDD.Fixie2)(Change) Dropped netcoreapp2.0 support #260 (Examples) Removed Example.LightBDD.MsTest2.UWP project as UWP is deprecated #255 (LightBDD.Core) Added IStep.AttachFile() method allowing to add file attachments to steps and fired StepFileAttached progress notification event when attachment is made #255 (LightBDD.Core) Added ReportWritersConfiguration.UpdateFileAttachmentsManager() to allow re-configuring file attachments storage #255 (LightBDD.Framework) Added support to attach files to steps with StepExecution.Current.AttachFile() #255 (LightBDD.Framework) Added FileAttachmentManager implementation and registered it with ReportWritersConfiguration.RegisterDefaultFileAttachmentManager() extension method to create attachments in ~/Reports folder #255 (LightBDD.Framework) Updated DefaultProgressNotifier to notify on StepFileAttached event #255 (LightBDD.Framework) Updated HtmlResultTextWriter / PlainTextReportFormatter / XmlReportFormatter to include file attachments #225 (Core)(New) Introduced IProgressNotifier and processing events: FeatureStarting, FeatureFinished, ScenarioStarting, ScenarioFinished, StepStarting, StepFinished, StepCommented #225 (Core)(New) Extended ScenarioExecutionContext with GetCurrentScenarioFixtureIfPresent to return fixture object executing given scenario #225 (Framework)(New) Introduced ProgressNotifierConfiguration to configure IProgressNotifier instances and updated DefaultProgressNotifier, NoProgressNotifier to implement IProgressNotifier and added ParallelProgressNotifierProvider.CreateProgressNotifier() method #225 (LightBDD.XUnit2/LightBDD.NUnit3/LightBDD.MsTest2/LightBDD.Fixie2)(Change) Updated projects to use IProgressNotifier configuration #225 (Core/Framework)(Change) Obsoleted IScenarioProgressNotifier, IFeatureProgressNotifier, DelegatingScenarioProgressNotifier, DelegatingFeatureProgressNotifier and all methods using them
Description
Implement event-based progress notification capability, that:
The issue with IScenarioNotifier / IFeatureNotifier
Progress
The text was updated successfully, but these errors were encountered: