picklesdoc / pickles

The open source living documentation generator
http://www.picklesdoc.com/
Apache License 2.0
464 stars 164 forks source link

NullReferenceException #559

Closed swatisharma03 closed 6 years ago

swatisharma03 commented 6 years ago

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

swatisharma03 commented 6 years ago

It was actually because I had folder inside the Features folder, and pickles doesn't look for features recursively.

dirkrombauts commented 6 years ago

Pickles does look for features recursively. If you can provide me with a sample project that shows the error, I can investigate.

swatisharma03 commented 6 years ago

Thanks for replying. Please find below the folder structure of my feature files: image

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

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

dirkrombauts commented 6 years ago

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?

swatisharma03 commented 6 years ago

You were right. It was because there was an empty feature file. Deleted it and it worked fine. Thanks a lot.

enkessler commented 5 years ago

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.