Atata 2.11.0 is released with added log information, deprecation of some APIs, and other enhancements.
Changelog
New features
- major
#778 Add
UseDisposeDriver(bool)
method toAtataContextBuilder
- minor
#785 Add
Report.Setup<TResult>(Func<TOwner, TPageObject> function)
method
Changes and enhancements
- minor
#774 Make obsolete
DriverAtataContextBuilder<TBuilder, TService, TOptions>.WithFixOfCommandExecutionDelay
method - minor
#775 Update
AddDirectoryFilesToNUnitTestContextOnCleanUpEventHandler
to order files by creation time - major
#776 Make obsolete
ScreenshotFileSavedEvent
class - minor
#777 Update NUnit clean-up event handlers to skip case when
Result.Outcome.Site == FailureSite.Child
- major
#779 Make obsolete
AtataContext.CleanUp
method - major
#780 Replace
AtataContextCleanUpEvent
with newAtataContextDeInitEvent
andAtataContextDeInitCompletedEvent
- major #781 Add more information to log about AtataContext driver initialization
- major #782 Add more information to log about AtataContext finish
- major #783 Use Selenium.WebDriver package v4.14.1
- major
#784 Deprecate
ScreenshotImageFormat
configuration for screenshots
Deprecate AtataContext.CleanUp
method
Use Dispose
instead.
If you don’t need to quit driver, use UseDisposeDriver(false)
method
of AtataContextBuilder
during AtataContext
setup.
AtataContext.Current.CleanUp();
->
AtataContext.Current.Dispose();
AtataContext.Current.CleanUp(false);
->
AtataContext.Configure()
.UseDisposeDriver(false) // <--
.Build();
//...
AtataContext.Current.Dispose();
Add more information to log about AtataContext driver initialization
Before the change:
2023-10-13 12:27:25.1910 TRACE > Set up AtataContext
...
2023-10-13 12:27:25.2452 TRACE - Set: DriverService=ChromeDriverService on port 58746
2023-10-13 12:27:26.5440 TRACE - Set: Driver=ChromeDriver (alias=chrome)
2023-10-13 12:27:26.5466 TRACE < Set up AtataContext (1.353s)
After the change:
2023-10-13 12:33:05.4688 TRACE > Initialize AtataContext
...
2023-10-13 12:33:05.4742 TRACE - > Initialize Driver
2023-10-13 12:33:05.4805 TRACE - - Created ChromeDriverService { Port=58873, ExecutablePath=D:\ProjectPath\bin\Debug\net7.0\drivers\chrome\117.0.5938.149\chromedriver.exe }
2023-10-13 12:33:06.4022 TRACE - - Created ChromeDriver { Alias=chrome, SessionId=899aef64779077ec3312d847fe063601 }
2023-10-13 12:33:06.4104 TRACE - < Initialize Driver (0.932s)
2023-10-13 12:33:06.4114 TRACE < Initialize AtataContext (0.942s)
Now more information during a driver creation is written to log, which might help in debugging tests, especially on CI.
Add more information to log about AtataContext finish
Before the change:
...
2023-10-13 13:58:59.2809 INFO Finished test (2.209s)
2023-10-13 13:58:59.2810 INFO Pure test execution time: 1.153s
After the change:
...
2023-10-13 14:58:20.9759 INFO Finished test
Total time: 2.209s
Initialization: 1.026s | 46.5 %
Test body: 1.153s | 52.2 %
Deinitialization: 0.029s | 1.3 %