SpecFlow.VisualStudio
SpecFlow.VisualStudio copied to clipboard
Partial feature highlight
SpecFlow Version:
- [x] 3.0
- [ ] 2.4
- [ ] 2.3
- [ ] 2.2
- [ ] 2.1
- [ ] 2.0
- [ ] 1.9
Used Test Runner
- [ ] SpecFlow+Runner
- [ ] MSTest
- [x] NUnit
- [ ] Xunit
Version number: 2019.0.31.31805
Project Format of the SpecFlow project
- [ ] Classic project format using
packages.config
- [ ] Classis project format using
<PackageReference>
tags - [ ] Sdk-style project format
.feature.cs files are generated using
- [ ]
SpecFlow.Tools.MsBuild.Generation
NuGet package - [x]
SpecFlowSingleFileGenerator
custom tool
Visual Studio Version
- [ ] VS 2019
- [ ] VS 2017
- [x] VS 2015
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settings
- [x] Enabled
- [ ] Disabled
Are the latest Visual Studio updates installed?
- [X] Yes
- [ ] No
.NET Framework:
- [x] >= .NET 4.5
- [ ] before .NET 4.5
- [ ] .NET Core 2.0
- [ ] .NET Core 2.1
- [ ] .NET Core 2.2
- [ ] .NET Core 3.0
Test Execution Method:
- [x] Visual Studio Test Explorer
- [ ] TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
- [ ] Command line – PLEASE SPECIFY THE FULL COMMAND LINE
<SpecFlow> Section in app.config or content of specflow.json
-
Repro Project
Issue Description
I have solution with ~100 feature files within 6 projects. Since recently I am observing issue where highlight stops working. More precisely, only one part of the feature file is highlighted and navigation (F12) only works on that part of the feature.
Steps to Reproduce
After opening solution this is output. NOTE1: VS Restart, reinstall did not help. NOTE2: On solution opening at one moment highlight seems to be working, but it get lost after solution gets fully loaded. NOTE3: The issue on the picture is visible in all features in all projects.
Output log:
[11:55:03.5139058] Tracing: Tracing enabled for all categories
[11:55:03.5139058] ProjectScopeFactory: subscribed to solution closed 1
[11:55:03.5298621] VsProjectScope: Initializing...
[11:55:03.5488619] VsProjectScope: Configuration loading error: System.**NullReferenceException**: Object reference not set to an instance of an object.
at TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler.CreateFromXml(String xmlContent)
at TechTalk.SpecFlow.IdeIntegration.Configuration.ConfigurationLoader.Load(SpecFlowConfiguration specFlowConfiguration, IConfigurationHolder configurationHolder)
at TechTalk.SpecFlow.VsIntegration.Implementation.LanguageService.VsProjectScope.LoadSpecFlowConfiguration(). Using default configuration instead.
[11:55:03.5498619] VsProjectScope: Initializing configuration file trackers ...
[11:55:03.5498619] VsProjectScope: Initializing file tracker for app.config ...
[11:55:03.5528648] FileChangeEventsListener: Start listening to file: C:\Repos\3.8.2\Product\FrontEndProcessor\Test\BehaviourTest\Series5\Series5BehaviourTestSuite\App.config
[11:55:03.5538623] VsProjectScope: Initialized file tracker for app.config
[11:55:03.5538623] VsProjectScope: Initializing file tracker for specflow.json ...
[11:55:03.5619102] VsProjectScope: Initialized file tracker for specflow.json
[11:55:03.5619102] VsProjectScope: Initialized configuration file trackers
[11:55:03.5650526] FileChangeEventsListener: Start listening to file: C:\Repos\3.8.2\Product\FrontEndProcessor\Test\BehaviourTest\Series5\Series5BehaviourTestSuite\Features\Acquisition.feature
[11:55:03.5650526] FileChangeEventsListener: Start listening to file: C:\Repos\3.8.2\Product\FrontEndProcessor\Test\BehaviourTest\Series5\Series5BehaviourTestSuite\Features\BasicScan.feature
...
[11:55:03.6158679] GherkinProcessingScheduler: Analyzing request 'Initialize BindingFilesTracker' queued on thread: 1
[11:55:03.6158679] GherkinProcessingScheduler: Analyzing request 'Initialize ProjectFeatureFilesTracker' queued on thread: 1
[11:55:03.8329042] StepMap: StepMap with 8 feature files and 56 step definitions loaded
[11:55:03.8339047] GherkinProcessingScheduler: Analyzing request 'Load from step map (ProjectFeatureFilesTracker)' queued on thread: 1
[11:55:03.8339047] GherkinProcessingScheduler: Analyzing request 'Load from step map (BindingFilesTracker)' queued on thread: 1
[11:55:03.8339047] GherkinProcessingScheduler: Analyzing request 'Analyze all starting (BindingFilesTracker)' queued on thread: 1
[11:55:03.8339047] GherkinProcessingScheduler: Analyzing request 'Analyze all starting (ProjectFeatureFilesTracker)' queued on thread: 1
...
[11:55:03.8339047] GherkinLanguageService: Language service created
[11:55:03.8358646] GherkinProcessingScheduler: Applying task 'Parse Gherkin: EntireFile' on thread: 48
[11:55:04.0258641] EditorParser: Start full parsing
[11:55:04.1218645] EditorParser: Finished full parsing in 94 ms, 0 errors
[11:55:04.3359073] GherkinProcessingScheduler: Applying task 'Initialize BindingFilesTracker' on thread: 49
[11:55:30.2028645] BindingFilesTracker: Initialized
[11:55:30.2028645] GherkinProcessingScheduler: Applying task 'Initialize ProjectFeatureFilesTracker' on thread: 49
[11:55:30.5148674] ProjectFeatureFilesTracker: Initialized
[11:55:30.5148674] GherkinProcessingScheduler: Applying task 'Load from step map (ProjectFeatureFilesTracker)' on thread: 49
[11:55:30.5478682] ProjectFeatureFilesTracker: Applied loaded fieature file steps
[11:55:30.5478682] GherkinProcessingScheduler: Applying task 'Load from step map (BindingFilesTracker)' on thread: 49
[11:55:30.7768769] BindingFilesTracker: Applied loaded bindings
[11:55:30.7768769] GherkinProcessingScheduler: Applying task 'Analyze all starting (BindingFilesTracker)' on thread: 49
[11:55:30.7788800] GherkinProcessingScheduler: Analyzing request 'Analyze all finishing (BindingFilesTracker)' queued on thread: 49
[11:55:31.2838638] GherkinProcessingScheduler: Applying task 'Analyze all starting (ProjectFeatureFilesTracker)' on thread: 49
[11:55:31.2858646] GherkinProcessingScheduler: Analyzing request 'Analyze all finishing (ProjectFeatureFilesTracker)' queued on thread: 49
[11:55:31.8078652] GherkinProcessingScheduler: Applying task 'Analyze all finishing (BindingFilesTracker)' on thread: 49
[11:55:31.8108629] ProjectStepSuggestionProvider: Suggestions from bindings ready
[11:55:31.8108629] GherkinProcessingScheduler: Applying task 'Analyze all finishing (ProjectFeatureFilesTracker)' on thread: 49
[11:55:31.8118633] VsGeneratorInfoProvider: Discovering generator information...
[11:55:32.2998657] VsGeneratorInfoProvider: Runtime found at C:\Repos\3.8.2\Product\Common\3rdPartyLibs\x64
[11:55:32.3008649] VsGeneratorInfoProvider: Unable to detect generator path
[11:55:32.3008649] RemoteGeneratorServices: Creating out of process remote wrapper for the project's generator ( at )
[11:55:33.5578631] ProjectStepSuggestionProvider: Suggestions from feature files ready
[11:55:33.5588755] StepMap: Step map up-to-date
[11:55:33.5588755] GherkinProcessingScheduler: Applying task 'Parse Gherkin: EntireFile' on thread: 48
[11:55:33.5598785] EditorParser: Start full parsing
[11:55:33.5779426] EditorParser: Finished full parsing in 17 ms, 6 errors
Update.. If I disable project-wide analyzes highlight is working but navigation still does not work.
Same problem here. VS 2017 with latest SpecFlow extension (2019.0.31.31805)
Disabling project-wide analyzes (Tools | Options | SpecFlow) indeed shows colors, but then all "Go To Definitions" are lost, which makes it even worse.
Actually, the issue seems to be on SpecFlow.VisualStudio project, not this one. But the other doesn't have an issue tab on github.
I was having the same problem and I downloaded this other extension called Deveroom for SpecFlow. It works like a charm for syntax highlight and navigation :) PS: Seems like you need to disable or uninstall the TechTalk extension (SpecFlow for Visual Studio 2017) for Deveroom to work
Unfortunately I am stuck with vs2015.
Having the same issue. TechTalk.SpecFlow.VsIntegration.2017-2017.2.7 was the last version that worked for me, newer versions does not manage to "highlight" the complete spec-file(s). The old version was not an option when moving to VS2019. Deveroom seems work better, although the colour scheme was not as nice with Deveroom, I think. No colour difference between table headers and table rows...
@jensakejohansson Interesting. We didn't change any code since years for the syntax highlighting. What we did after the 2017.2.7 release was, that we moved a lot of code into different projects. But that should not make any difference.