TestArmada / magellan

Large Scale Automated Testing for Mocha, Nightwatch, Appium, Nodejs, etc
MIT License
287 stars 44 forks source link

Make nightwatch err and warn visible in stdout #289

Closed g00dnatur3 closed 4 years ago

g00dnatur3 commented 4 years ago

Currently the "ERROR" and "WARN" logs from nightwatch are suppressed when the debug flag is turned OFF.. and our customers ALWAYS use the debug off, because if you turn it on your log will be filled with base64 screenshot gobbledegook...

Also, the approach i took, we will see all the "ERROR-ed" selenium request/response logs in our magellan log

BEFORE LOG

Screen Shot 2020-08-24 at 3 42 39 PM

AFTER LOG

Screen Shot 2020-08-24 at 3 37 24 PM

in the example above i modified the nightwatch code in my node_modules to have this code Logger.warn('__EXAMPLE_WORKING__ Success saving screenshot 200 ok');

Previously, this code would not have been logged to the magellan stdout.

in the AFTER LOG you can see that it is working GREAT :)

the â is really the red X .. its just my terminal settings are making it show up as â instead of the fancy X

codecov-commenter commented 4 years ago

Codecov Report

Merging #289 into master will decrease coverage by 0.27%. The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #289      +/-   ##
==========================================
- Coverage   97.26%   96.99%   -0.28%     
==========================================
  Files          31       31              
  Lines         988      997       +9     
==========================================
+ Hits          961      967       +6     
- Misses         27       30       +3     
Impacted Files Coverage Δ
src/cli.js 93.40% <25.00%> (-1.54%) :arrow_down:
src/util/childProcess.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 54824f2...9b5dd73. Read the comment docs.