Atata 2.14.0 is Released

January 10, 2024 by Yevgeniy Shunevych


Atata 2.14.0 is released with a couple of enhancements and fixes.

Changelog

Breaking Changes

  • break #802 Remove FileScreenshotConsumerBase.ImageFormat property

New features

  • minor #805 Add UseSpecFlowNUnitFeatures method to AtataContextBuilder

Changes and enhancements

  • major #801 Rework verification error handling and logging
  • major #803 Use Selenium.WebDriver package v4.16.2
  • minor #804 Update Stringifier to return char value as string wrapped with quotes
  • minor #806 Dispose driver safely in AtataContext

Fixes

  • fix #799 Possible bug for [TermAttribute] with multiple params values
  • fix #800 Warnings can be not included in error message for NUnit

Reworked verification error handling and logging

Error handling

Verification error handling and logging was reviewed and reworked. There was a need to distinguish default Atata native assertion failure handling and the handling for NUnit. Similar to how it is done for warnings.

The new IAssertionFailureReportStrategy appeared with 2 implementations: default AtataAssertionFailureReportStrategy and NUnitAssertionFailureReportStrategy.

New methods added to AtataContextBuilder:

AtataContextBuilder UseAssertionFailureReportStrategy(IAssertionFailureReportStrategy strategy);

AtataContextBuilder UseNUnitAssertionFailureReportStrategy();

UseNUnitAssertionFailureReportStrategy is called by UseAllNUnitFeatures method, so mostly there is no need for extra configuration.

Logging

Until now, assertion error is logged exactly inside “Assert” log section, before that it was logged in “Deinitialization” log section. Also all exceptions occurred in “Step”, “Setup” and “Aggregate assert” sections are now logged inside these sections. Aggregate assertion exception is now not logged as an error in “Deinitialization” section to avoid duplication of failures in log, because they are logged during the test execution one by one. In all other cases unhandled exceptions will continue to be written to log in “Deinitialization” log section.

Other

A blank line added between multiple errors in aggregate assertion exception message for NUnit, as below:

Multiple failures or warnings in test:
  1) Unexpected sut
Expected: should contain "x"
  Actual: "abc"

  2) Unexpected sut
Expected: should contain "y"
  Actual: "abc"

  3) Wrong sut
Expected: should contain "z"
  Actual: "abc"