-
Notifications
You must be signed in to change notification settings - Fork 164
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
Test Results Files by Directory #407
Changes from 1 commit
1175bf4
456dfa6
0bbe5f3
74d0957
d389d70
af85ee8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,22 @@ | |
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
<TargetFrameworkProfile /> | ||
<PublishUrl>C:\Users\aadams\Documents\ADP\published_files\pickles\</PublishUrl> | ||
<Install>true</Install> | ||
<InstallFrom>Disk</InstallFrom> | ||
<UpdateEnabled>false</UpdateEnabled> | ||
<UpdateMode>Foreground</UpdateMode> | ||
<UpdateInterval>7</UpdateInterval> | ||
<UpdateIntervalUnits>Days</UpdateIntervalUnits> | ||
<UpdatePeriodically>false</UpdatePeriodically> | ||
<UpdateRequired>false</UpdateRequired> | ||
<MapFileExtensions>true</MapFileExtensions> | ||
<ApplicationRevision>0</ApplicationRevision> | ||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> | ||
<IsWebBootstrapper>false</IsWebBootstrapper> | ||
<UseApplicationTrust>false</UseApplicationTrust> | ||
<PublishWizardCompleted>true</PublishWizardCompleted> | ||
<BootstrapperEnabled>true</BootstrapperEnabled> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
|
@@ -41,6 +57,18 @@ | |
<PropertyGroup> | ||
<StartupObject>PicklesDoc.Pickles.CommandLine.Program</StartupObject> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<ManifestCertificateThumbprint>58C81F2E680EB86FABDBEE60F94068CFF0846BAC</ManifestCertificateThumbprint> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also don't need this clickonce code in pickles |
||
</PropertyGroup> | ||
<PropertyGroup> | ||
<ManifestKeyFile>Pickles.CommandLine_TemporaryKey.pfx</ManifestKeyFile> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<GenerateManifests>true</GenerateManifests> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SignManifests>true</SignManifests> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Autofac, Version=4.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Autofac.4.3.0\lib\net45\Autofac.dll</HintPath> | ||
|
@@ -92,8 +120,21 @@ | |
<None Include="packages.config"> | ||
<SubType>Designer</SubType> | ||
</None> | ||
<None Include="Pickles.CommandLine_TemporaryKey.pfx" /> | ||
<None Include="Settings.StyleCop" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<BootstrapperPackage Include=".NETFramework,Version=v4.5"> | ||
<Visible>False</Visible> | ||
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName> | ||
<Install>true</Install> | ||
</BootstrapperPackage> | ||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> | ||
<Visible>False</Visible> | ||
<ProductName>.NET Framework 3.5 SP1</ProductName> | ||
<Install>false</Install> | ||
</BootstrapperPackage> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ private static int Main(string[] args) | |
{ | ||
if (Log.IsFatalEnabled) | ||
{ | ||
Log.Info(ex.StackTrace); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one I like. |
||
Log.Fatal(ex, "Pickles did not complete successfully"); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,7 +153,13 @@ public XElement Format(ScenarioOutline scenarioOutline, params string[] exampleV | |
{ | ||
if (this.configuration.HasTestResults) | ||
{ | ||
TestResult exampleResult = this.results.GetExampleResult(scenarioOutline, exampleValues); | ||
TestResult exampleResult = TestResult.Inconclusive; | ||
|
||
try | ||
{ | ||
exampleResult = this.results.GetExampleResult(scenarioOutline, exampleValues); | ||
} | ||
catch (Exception) { } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're swallowing an exception without handling it in any way. That's bad. |
||
|
||
return this.BuildImageElement(exampleResult); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,14 @@ public class CucumberJsonSingleResultLoader : ISingleResultLoader | |
{ | ||
public SingleTestRunBase Load(FileInfoBase fileInfo) | ||
{ | ||
return new CucumberJsonSingleResults(this.ReadResultsFile(fileInfo)); | ||
List<Feature> features = this.ReadResultsFile(fileInfo); | ||
if (features == null) | ||
{ | ||
Console.WriteLine("There was an issue with the results format for " + fileInfo.Name); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're writing to Console.WriteLine instead of using the Logging infrastructure. |
||
features = new List<Feature>(); | ||
} | ||
|
||
return new CucumberJsonSingleResults(features); | ||
} | ||
|
||
private List<Feature> ReadResultsFile(FileInfoBase testResultsFile) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,23 +97,38 @@ private static void SetResultsForIndividualScenariosUnderFeature(FeatureNode fea | |
|
||
if (scenario != null) | ||
{ | ||
featureElement.Result = testResults.GetScenarioResult(scenario); | ||
try { | ||
featureElement.Result = testResults.GetScenarioResult(scenario); | ||
} | ||
catch (Exception e) | ||
{ | ||
Log.Error("An exception occured in aligning results with the feature for : " + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're blindly logging all exceptions but not taking appropriate action. Not good. |
||
featureTreeNode.Feature.Name + | ||
" Message: " + e.Message); | ||
} | ||
continue; | ||
} | ||
|
||
var scenarioOutline = featureElement as ScenarioOutline; | ||
|
||
if (scenarioOutline != null) | ||
{ | ||
foreach (var example in scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows)) | ||
try | ||
{ | ||
example.Result = testResults.GetExampleResult(scenarioOutline, example.Cells.ToArray()); | ||
foreach (var example in scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows)) | ||
{ | ||
example.Result = testResults.GetExampleResult(scenarioOutline, example.Cells.ToArray()); | ||
} | ||
|
||
scenarioOutline.Result = | ||
scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows) | ||
.Select(row => row.Result) | ||
.Merge(); | ||
} catch (Exception e) { | ||
Log.Error("An exception occured in aligning results with the feature for : " + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again: you're blindly logging an exception but taking no appropriate action. You should at the very least rethrow the exception. You should also be more selective in which exceptions you catch. |
||
featureTreeNode.Feature.Name + | ||
" Message: " + e.Message); | ||
} | ||
|
||
scenarioOutline.Result = | ||
scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows) | ||
.Select(row => row.Result) | ||
.Merge(); | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need clickonce code in Pickles