A listener that prints a Stack Trace to console to faster find the code section where the failure appears.
Project description
robotframework-stacktrace
A listener for RF >= 4.0 that prints a Stack Trace to console to faster find the code section where the failure appears.
Installation
pip install robotframework-stacktrace
Usage
robot --listener RobotStackTracer <your file.robot>
Example
Old Console Output:
robot -d logs TestCases/14_Browser/01_CarConfig.robot
==============================================================================
01 CarConfig
==============================================================================
Configure Car with Pass | FAIL |
TimeoutError: page.selectOption: Timeout 3000ms exceeded.
=========================== logs ===========================
waiting for selector ""Basismodell" >> ../.. >> select"
selector resolved to visible <select _ngcontent-c7="" class="maxWidth ng-untouched ng…>…</select>
selecting specified option(s)
did not find some options - waiting...
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
------------------------------------------------------------------------------
Configure Car with wrong Acc | FAIL |
TimeoutError: page.check: Timeout 3000ms exceeded.
=========================== logs ===========================
waiting for selector "//span[contains(text(),'aABS')]/../input"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
------------------------------------------------------------------------------
Configure Car with car Acc | FAIL |
TimeoutError: page.click: Timeout 3000ms exceeded.
=========================== logs ===========================
waiting for selector "[href="/config/summary/wrong"]"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
------------------------------------------------------------------------------
01 CarConfig | FAIL |
3 tests, 0 passed, 3 failed
==============================================================================
Output: /Source/RF-Schulung/02_RobotFiles/logs/output.xml
Log: /Source/RF-Schulung/02_RobotFiles/logs/log.html
Report: /Source/RF-Schulung/02_RobotFiles/logs/report.html
New Stack Trace Output
robot -d logs --listener RobotStackTracer TestCases/14_Browser/01_CarConfig.robot
==============================================================================
01 CarConfig
==============================================================================
Configure Car with Pass ...
Traceback (most recent call last):
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/01_CarConfig.robot:23"
> Configure Car with Pass
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/01_CarConfig.robot:27"
> Select aMinigolf as model
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/functional_keywords.resource:14"
> Select Options By ${select_CarBaseModel} text ${basemodel}
| ${select_CarBaseModel} = "Basismodell" >> ../.. >> select (str)
| ${basemodel} = aMinigolf (str)
Configure Car with Pass | FAIL |
TimeoutError: page.selectOption: Timeout 3000ms exceeded.
=========================== logs ===========================
waiting for selector ""Basismodell" >> ../.. >> select"
selector resolved to visible <select _ngcontent-c7="" class="maxWidth ng-untouched ng…>…</select>
selecting specified option(s)
did not find some options - waiting...
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
------------------------------------------------------------------------------
Configure Car with wrong Acc ...
Traceback (most recent call last):
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/01_CarConfig.robot:37"
> Configure Car with wrong Acc
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/01_CarConfig.robot:42"
> Select Accessory aABS
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/functional_keywords.resource:38"
> Check Checkbox //span[contains(text(),'${accessory}')]/../input
| //span[contains(text(),'${accessory}')]/../input = //span[contains(text(),'aABS')]/../input (str)
Configure Car with wrong Acc | FAIL |
TimeoutError: page.check: Timeout 3000ms exceeded.
=========================== logs ===========================
waiting for selector "//span[contains(text(),'aABS')]/../input"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
------------------------------------------------------------------------------
Configure Car with car Acc ..F.
Traceback (most recent call last):
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/01_CarConfig.robot:50"
> Configure Car with car Acc
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/01_CarConfig.robot:61"
> Set wrong Car Name ${car}
| ${car} = My New Car (str)
File "/Source/RF-Schulung/02_RobotFiles/TestCases/14_Browser/functional_keywords.resource:53"
> Click ${car_name}
| ${car_name} = [href="/config/summary/wrong"] (str)
Configure Car with car Acc | FAIL |
TimeoutError: page.click: Timeout 3000ms exceeded.
=========================== logs ===========================
waiting for selector "[href="/config/summary/wrong"]"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
------------------------------------------------------------------------------
01 CarConfig | FAIL |
3 tests, 0 passed, 3 failed
==============================================================================
Output: /Source/RF-Schulung/02_RobotFiles/logs/output.xml
Log: /Source/RF-Schulung/02_RobotFiles/logs/log.html
Report: /Source/RF-Schulung/02_RobotFiles/logs/report.html
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for robotframework-stacktrace-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4f28348766fae9244c91ad146c0b612291960d0698c33030853ffff9c8baeb |
|
MD5 | 4f5d3d2621e0586722b5d1dd862bed25 |
|
BLAKE2b-256 | 2a1d842e6b9ee08d3356a69389c0bbcce39c5198b4acc1577f48c26abcf1921b |
Close
Hashes for robotframework_stacktrace-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37df148d1178b1036f89150a12973e2e663bf065fe18682500203fd1055139ce |
|
MD5 | b0cea2de46c2751cb6a1ee493a608e99 |
|
BLAKE2b-256 | 585a8014955753972e2b49dbda302093e7caa0eaa30516c6ebaf1434a5a562bd |