webdriverio-boneyard / wdio-junit-reporter

A WebdriverIO v4 plugin. Report results in junit xml format.
http://v4.webdriver.io
MIT License
11 stars 42 forks source link

No <system-out> in junit reports in wdio v5 #105

Open pauravp opened 4 years ago

pauravp commented 4 years ago

In v4 , even if logLevel of wdio was silent but in case of error junit reports used to have system output like this

<testcase classname="chrome.gallery/gallery_view_test_spec" name="gallery_grid_view" time="0.955">
      <system-out>
        <![CDATA[
COMMAND: POST http://127.0.0.1:4444/wd/hub/session/40246d547833c9353af00d3f6eb59371/elements - {"using":"css selector","value":"#public-gallery-switch > div:nth-child(2) > div"}
RESULT: {"sessionId":"40246d547833c9353af00d3f6eb59371","status":0,"value":[]}
COMMAND: POST http://127.0.0.1:4444/wd/hub/session/40246d547833c9353af00d3f6eb59371/elements - {"using":"css selector","value":"#public-gallery-switch > div:nth-child(2) > div"}
RESULT: {"sessionId":"40246d547833c9353af00d3f6eb59371","status":0,"value":[{"ELEMENT":"0.669699042200689-3"}]}

]]>
      </system-out>
    </testcase>

but now in v5 , there is only system-err which doesn't contains COMMAND and RESULT which were very helpful. Is it possible to being system output back in reports using any config option?

<testcase classname="chrome.77_0_3865_120.macosx.video" name="remove_uploaded_video_from_adhoc" time="30.006">
     <error message="Couldn't find div[class*=&quot;grid-asset&quot;][style*=&quot;visible&quot;] at 0 position"/>
     <system-err>
       <![CDATA[
Error: Couldn't find div[class*="grid-asset"][style*="visible"] at 0 position
   at Object.waitForElementAt (/Users/pallvipaurav/Git/lrwebdriverio/test/helpers/common_functions.js:64:11)
   at Object.select_img (/Users/pallvipaurav/Git/lrwebdriverio/test/helpers/common_functions.js:556:29)
   at Context.it (/Users/pallvipaurav/Git/lrwebdriverio/test/specs/video/video_adhoc_upload_test_spec.js:71:10)
]]>
     </system-err>
   </testcase>
christian-bromann commented 4 years ago

This repository contains the code for the v4 service. If you want to have fixes please provide a PR in the webdriverio/webdriverio repository.