Skip to content

Unicorn-TAF/allure-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

210 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuget Nuget

Allure agent

Unicorn has ability to generate powerful test results report using Allure Framework

Just deploy Allure Framework instance, add tests project dependency to Unicorn.Reporting.Allure package and initialize reporter during tests assembly initialization.


Place allureConfig.json configuration file to directory with test assemblies. Sample content is presented below:

{
    "allure": {
        "directory": "path_to_directory_with_report"
    }
}

then add code with reporting initialization to [TestsAssembly]

using Unicorn.Taf.Api;
using Unicorn.Core.Testing.Tests.Attributes;
using Unicorn.Reporting.Allure;

namespace Tests
{
    [TestsAssembly]
    public static class TestsAssembly
    {
        private static ITestReporter reporter;

        [RunInitialize]
        public static void InitRun()
        {
            reporter = new AllureReporter(); // starts new launch in Allure.
        }

        [RunFinalize]
        public static void FinalizeRun()
        {
            reporter.Dispose(); // Unsubscribe allure reporter from unicorn events.
            reporter = null;
        }
    }
}  

Packages

 
 
 

Contributors