Skip to content

Commit

Permalink
QE-15477 do not replace scenario error message (#454)
Browse files Browse the repository at this point in the history
Currently, when a scenario fails and the after scenario hook also fails,
the after scenario hook error message overwrites the scenario failure
error message. It makes debugging the actual failure difficult.

After this PR, the after scenario hook error message will be in the log
file but not in the secnario error message
  • Loading branch information
ddl-xin authored Apr 2, 2024
1 parent 47c3dae commit e2878ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project closely adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.194.0
## 0.196.0
- Fix - after scenario hook error message unintentionally replaces scenario error message

## 0.195.0
- Fix - HTML report is generated into a wrong folder
- Change - `&` is replaced in file name
- Change - shortened feature name and scenario name are recorded in JUnit
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cucu"
version = "0.195.0"
version = "0.196.0"
license = "MIT"
description = "Easy BDD web testing"
authors = ["Domino Data Lab <[email protected]>"]
Expand Down
1 change: 0 additions & 1 deletion src/cucu/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def run_after_scenario_hook(ctx, scenario, hook):
f"HOOK-ERROR in {hook.__name__}: {e.__class__.__name__}: {e}\n"
)
error_message += traceback.format_exc()
scenario.error_message = error_message
logger.error(error_message)


Expand Down

0 comments on commit e2878ef

Please sign in to comment.