NullReferenceException
swatisharma03 opened this issue · 6 comments
Hello,
I am getting the following error. Not sure why? Is it because I have background in my features?
Also I am using Specflow features.
PM> Pickle-Features -FeatureDirectory .\Automation.Framework\Features -OutputDirectory C:\Pickles -SystemUnderTestName "Automation Framework" -SystemUnderTestVersion "6.2" -DocumentationFormat dhtml
Pickles v.2.20.1.0
Generating documentation based on the following parameters
Feature Directory : C:\Source\WW7\Automation.Framework\Features
Output Directory : C:\Pickles
Project Name : Automation Framework
Project Version : 6.2
Language : en
Incorporate Test Results? : No
Include Experimental Features? : No
Exclude Tag :
Technical Tag :
Pickle-Features : Object reference not set to an instance of an object.
At line:1 char:1
- Pickle-Features -FeatureDirectory .\Automation.Framework\Features -Ou ...
-
+ CategoryInfo : NotSpecified: (:) [Pickle-Features], NullReferenceException + FullyQualifiedErrorId : System.NullReferenceException,PicklesDoc.Pickles.PowerShell.Pickle_Features
It was actually because I had folder inside the Features folder, and pickles doesn't look for features recursively.
Pickles does look for features recursively. If you can provide me with a sample project that shows the error, I can investigate.
Thanks for replying. Please find below the folder structure of my feature files:
So if I use,
PM> Pickle-Features -FeatureDirectory .\Automation.Framework\Features -OutputDirectory C:\PICKLES -DocumentationFormat dhtml
I get this error:
Pickle-Features : Object reference not set to an instance of an object.
At line:1 char:1
- CategoryInfo : NotSpecified: (:) [Pickle-Features], NullReferenceException
- FullyQualifiedErrorId : System.NullReferenceException,PicklesDoc.Pickles.PowerShell.Pickle_Features
But if I use the following, the pickle reports are created successfully but of course only for the features inside SystenSettings folder:
PM> Pickle-Features -FeatureDirectory .\Automation.Framework\Features\SystemSettings -OutputDirectory C:\PICKLES -DocumentationFormat dhtml
Hope this helps. Please let me know if any further info is required.
Cheers,
Swati
This leads me to believe there may be a problem with the format of one of the feature files in your solution. Could you try to narrow it down by restricting to Planning, and then to DataCapture - like you did with SystemSettings?
You were right. It was because there was an empty feature file.
Deleted it and it worked fine.
Thanks a lot.
It was because there was an empty feature file.
I just ran into this problem as well. Pickles was failing silently and not generating anything and I narrowed it down to being caused by the addition of an empty '.feature' file.
there may be a problem with the format of one of the feature files in your solution.
But an empty feature file is syntactically valid (if not particularly meaningful) Gherkin.