I am using SpecFlow and Nunit 3 with NUnit3Adaptor.
Within my test steps I am logging some test messages and capturing screenthot but I can't find anything in the bin folder nor in the Project directory. I don't even see TestResults folder.
IDriver Driver = new LocalDriver();
Driver.Log.Screenshot(test.controlGrid, "Screenhot of a Grid table");
Assert.Fail();// force failing in case the logs are being cleared
Am I missing something here ? Can anyone please help me how to use the TestLeft's capturing Test Log and screenshot funtionality?
Thanks in advance
> I am using SpecFlow and Nunit 3 with NUnit3Adaptor.
What about TestLeft (as this is TestLeft's dedicated forum) ?
> Am I missing something here ?
I know whats happening, when we add a TestLeft to our project it creates TestFixtureBase with NUnit hook attributes ([OneTimeSetUp], [OneTimeTearDown] ..etc) methods
public void InitializeFixture()
public void FinalizeFixture()
_driver.Log.Save(TestContext.CurrentContext.TestDirectory + @"\TestResults", Log.Format.Html);
public void TestSetUp()
When running the NUnit tests, the logging and saving logs, works fine. But when we add SpecFlow on top of this, then these methods with NUnit hook attribute won't get run as SpecFlow has its own hook attributes [BeforeScenario], [BeforeTestRun], [AfterScenario]... etc.
So we would need to replace [OneTimeSetUp] to [BeforeTestRun] and [OneTimeTearDown] to [AfterTestRun] and make the binding methods static and add "[Binding]" on top of the class signature
Thank you for the detailed description. Hope it will help someone else who will use the configuration like yours.