Skip to content

Feat/add assertion logging - #527

Open
martingrossmann wants to merge 7 commits into
masterfrom
feat/add-assertion-logging
Open

Feat/add assertion logging#527
martingrossmann wants to merge 7 commits into
masterfrom
feat/add-assertion-logging

Conversation

@martingrossmann

@martingrossmann martingrossmann commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds log information about assertion of UiElement like:

01.07.2026 15:13:37.965 [main][INFO][MCID:3]: asserts.DefaultBinaryAssertion - Assertion passed: WebTestPage -> UiElement(By.id: notDisplayedElement) style=[display: none;] contains [display: none]
01.07.2026 15:13:38.012 [main][INFO][MCID:3]: asserts.DefaultBinaryAssertion - Assertion passed: WebTestPage -> UiElement(By.id: notDisplayedElement) displayed
01.07.2026 15:13:38.083 [main][INFO][MCID:3]: asserts.DefaultBinaryAssertion - Assertion passed: WebTestPage -> UiElement(By.id: notDisplayedElement) class=[] has words [button]
01.07.2026 15:13:46.965 [main][ERROR][MCID:11]: asserts.DefaultBinaryAssertion - Assertion failed: Expected that WebTestPage -> UiElement(By.id: notVisibleElement) complete visible is true

Using ASSERT you get logging like this:

02.07.2026 14:03:34.392 [main][INFO][MCID:1]: testng.DefaultAssertionWrapper - Assertion passed: Expected [1] equals [1]
// or with subject
02.07.2026 14:04:14.571 [main][INFO][MCID:1]: testng.DefaultAssertionWrapper - Assertion passed: Expected that Test [1] equals [1]

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@martingrossmann
martingrossmann marked this pull request as draft July 2, 2026 06:40
@martingrossmann
martingrossmann marked this pull request as ready for review July 2, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant