postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.9k stars 1.17k forks source link

Option to not truncate stacktraces when using `--verbose ` #3237

Open twoertwein opened 6 months ago

twoertwein commented 6 months ago
  1. Newman Version (can be found via newman -v): 6.1.2
  2. OS details (type, version, and architecture): docker:20.10.8 (run by the CI)
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there: recently
  5. Expected behaviour: do not truncate stacktraces
  6. Command / script used to run Newman: newman run --verbose ...
$ newman run --verbose ...
[...]
┌ ↓ text/plain ★ text ★ plain ★ utf8 ★ 3.13kB
  │ Traceback (most recent call last):
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/middleware/errors.py", line 164, in __call__
  │     await self.app(scope, receive, _send)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/middleware/exceptions.py", line 65, in __call__
  │     await wrap_app_handling_exceptions(self.app, conn)
  │ (scope, receive, send)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/_exception_handler.py", line 64, in wrapped_app
  │     raise exc
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/_exception_handler.py", line 53, in wrapped_app
  │     await app(scope, receive, sender)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/routing.py", line 756, in __call__
  │     await self.middleware_stack(scope, receive, send)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/routing.py", line 776, in app
  │     await route.handle(scope, receive, send)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/routing.py", line 297, in handle
  │     await self.app(scope, receive, send)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/routing.py", line 77, in app
  │     await wrap_app_handling_exceptions(app, request)(s
  │ cope, receive, send)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/_exception_handler.py", line 64, in wrapped_app
  │     raise exc
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/_exception_handler.py", line 53, in wrapped_app
  │     await app(scope, receive, sender)
  │   File "/usr/local/lib/python3.11/site-packages/starle
  │ tte/routing.py", line 72, in app
  │     response = await func(request)
  │                ^^^^^^^^^^^^^^^^^^^
  │   File "/usr/local/lib/python3.11/site-packages/fastap
  │ i/routing.py", line 269, in app
  │     solved_result = await solve_dependencies(
  │                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  │   File "/usr/local/lib/python3.11/site-packages/fastap
  │ i/dependencies/utils.py", line 600, in solve_dependenc
  │ ies
  │     solved = await call(**sub_values)
  │              ^^^^^^^^^^^^^^^^^^^^^^^^
  │   File "/src/JWTBearer.py", line 53, in __call__
  │     jwt_cre
  │ (showing 2.05kB/3.13kB)
  └

Not truncating stacktraces would be beneficial to debug errors, especially when errors occur on the CI and are more difficult to reproduce locally.

twoertwein commented 6 months ago

or maybe truncate the other way round: have the full end and skip the beginning.

aadarsh-nagrath commented 4 months ago

redirect to a log file, or maybe increase the terminal output display limit