Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Fix for custom json field
Browse files Browse the repository at this point in the history
  • Loading branch information
unickq committed Sep 10, 2018
1 parent caf0bbc commit 351e31e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions src/Core/AllureNUnitHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,18 @@ internal static Status GetNUnitStatus()
{
var jo = JObject.Parse(AllureLifecycle.JsonConfiguration);
var allureSection = jo["allure"];
var config = allureSection?.ToObject<AllureExtendedConfiguration>();
if (config?.BrokenTestData != null)
foreach (var word in config.BrokenTestData)
if (result.Message.Contains(word))
return Status.broken;
try
{
var config = allureSection?.ToObject<AllureExtendedConfiguration>();
if (config?.BrokenTestData != null)
foreach (var word in config.BrokenTestData)
if (result.Message.Contains(word))
return Status.broken;
}
catch (Exception)
{
//Ignored
}

switch (result.Outcome.Status)
{
Expand Down
2 changes: 1 addition & 1 deletion src/allure-nunit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RepositoryUrl>https://github.com/unickq/allure-nunit</RepositoryUrl>
<PackageLicenseUrl>https://github.com/unickq/allure-nunit/blob/master/LICENSE</PackageLicenseUrl>
<PackageTags>nunit allure</PackageTags>
<PackageReleaseNotes>TestFixture(Category) fix</PackageReleaseNotes>
<PackageReleaseNotes>OneTime attributes support</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/unickq/allure-nunit/master/logo.png</PackageIconUrl>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down

0 comments on commit 351e31e

Please sign in to comment.