boa-constrictor icon indicating copy to clipboard operation
boa-constrictor copied to clipboard

As a developer, `attempts to` should be logged as `Trace`, so that the Screenplay log can be easily filtered.

Open Pressacco opened this issue 1 year ago • 2 comments

Description

Intent

Extract a test summary, by filtering the Screenplay log by severity.

This could be accomplished by logging the following as Trace:

  • attempts to
  • asks for

Alternatives

  1. Could create a separate log file at run-time, but why bother?

Anything else?

Expected

The log file after Trace messages has been filtered out:

Adding Ability for Screenplay Actor 'Andy' to browse the Web with OpenQA.Selenium.Chrome.ChromeDriver
Screenplay Actor 'Andy' successfully did navigate browser to 'https://www.duckduckgo.com/'
Screenplay Actor 'Andy' observed that the wait until existence of 'DuckDuckGo Search Input' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' observed that the HTML attribute of 'value' for 'DuckDuckGo Search Input' was 
Screenplay Actor 'Andy' observed that the wait until appearance of 'DuckDuckGo Search Input' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' successfully did clear using backspaces, then send keys 'panda' to DuckDuckGo Search Input
Screenplay Actor 'Andy' observed that the wait until appearance of 'DuckDuckGo Search Button' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' successfully did click on 'DuckDuckGo Search Button'
Screenplay Actor 'Andy' successfully did Boa.Constrictor.Example.SearchDuckDuckGo
Screenplay Actor 'Andy' observed that the wait until appearance of 'DuckDuckGo Result Page Links' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' successfully did quit the WebDriver

Actual

The current Screenplay log file:

Screenplay Actor 'Andy' attempts to navigate browser to 'https://www.duckduckgo.com/'
Screenplay Actor 'Andy' successfully did navigate browser to 'https://www.duckduckgo.com/'
Screenplay Actor 'Andy' asking for HTML attribute of 'value' for 'DuckDuckGo Search Input'
Screenplay Actor 'Andy' asks for wait until existence of 'DuckDuckGo Search Input' is equal to 'True'
Screenplay Actor 'Andy' observed that the wait until existence of 'DuckDuckGo Search Input' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' observed that the HTML attribute of 'value' for 'DuckDuckGo Search Input' was 
Screenplay Actor 'Andy' attempts to Boa.Constrictor.Example.SearchDuckDuckGo
Screenplay Actor 'Andy' attempts to clear using backspaces, then send keys 'panda' to DuckDuckGo Search Input
Screenplay Actor 'Andy' asks for wait until appearance of 'DuckDuckGo Search Input' is equal to 'True'
Screenplay Actor 'Andy' observed that the wait until appearance of 'DuckDuckGo Search Input' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' successfully did clear using backspaces, then send keys 'panda' to DuckDuckGo Search Input
Screenplay Actor 'Andy' attempts to click on 'DuckDuckGo Search Button'
Screenplay Actor 'Andy' asks for wait until appearance of 'DuckDuckGo Search Button' is equal to 'True'
Screenplay Actor 'Andy' observed that the wait until appearance of 'DuckDuckGo Search Button' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' successfully did click on 'DuckDuckGo Search Button'
Screenplay Actor 'Andy' successfully did Boa.Constrictor.Example.SearchDuckDuckGo
Screenplay Actor 'Andy' asks for wait until appearance of 'DuckDuckGo Result Page Links' is equal to 'True'
Screenplay Actor 'Andy' observed that the wait until appearance of 'DuckDuckGo Result Page Links' is equal to 'True' for up to 30s was True
Screenplay Actor 'Andy' attempts to quit the WebDriver
Screenplay Actor 'Andy' successfully did quit the WebDriver

Commitments

  • [X] I agree to follow Boa Constrictor's Code of Conduct.
  • [X] I want to work on this issue myself. (This is voluntary, not required.)

Pressacco avatar Mar 15 '23 15:03 Pressacco

The proposed change, and subsequent unit tests, are related to:

  • #255

Pressacco avatar Mar 15 '23 15:03 Pressacco

This is a really good idea.

AutomationPanda avatar May 25 '23 01:05 AutomationPanda