Report file not showing BeforeTestRun Hook

17 views
Skip to first unread message

Dennis R

unread,
Apr 13, 2020, 4:36:50 PM4/13/20
to SpecRun
I've put Console.WtiteLines in my Hooks binding methods.
My Report .html file does not show the  BeforeTestRun.  The first Trace section of the report shows
And the last trace section shows that the AfterTestRun is happening before the AfterFeature!



namespace SpecFlowControls
{
    [Binding]
    public sealed class Hooks
    {
        [BeforeTestRun]
        public static void BeforeTestRun()
        {
            Console.WriteLine("BeforeTestRun");

        [AfterTestRun]
        public static void AfterTestRun()
        {
            Console.WriteLine("AfterTestRun");
     
   }


        [BeforeFeature]
        public static void BeforeFeature()
        {
            Console.WriteLine("BeforeFeature");
        }

        [AfterTestRun]
        public static void AfterFeature()
        {
            Console.WriteLine("AfterFeature");
     
   }
}

Annie Costa

unread,
Jul 5, 2022, 9:42:52 AM7/5/22
to SpecRun
Hi,

Did you manage to resolve that problem?
I have the same too and do not understand why? :(
Reply all
Reply to author
Forward
0 new messages