Forum Discussion

ByronJ's avatar
ByronJ
Occasional Contributor
7 years ago

[Potential Bug] -J command line argument not acting as expected

Hi all,

 

I have been working with the XML JUnit Reports generated by the testrunner.sh script in Jenkins and am puzzled by the outcome I receive.

 

I make use of an excel spreadsheet that populates various properties through a particular test case run. My expectation is that if there is an error that occurs during a particular iteration of the testcase I would see all properties that were passed to that test case that failed, including those from the spreadsheet.

 

However when I run '-jJ' I get the following:

 

<testcase name="Test" time="3.693">
      <properties/>
      <failure>
###Redacted### </failure> </testcase>

 

Any answer that helps me better represent my datasources' properties will be greatly appreciated!

 

 

[ On a side note, there is a definite bug in terms of how the command line communicates how the -J command works. To quote the code: 

 

Sets the output to include JUnit XML reports adding test properties to the report

This is however, not true. It does not turn on exporting JUnit XML reports. It only adds the properties object. It would be cool if this could be fixed as only specifying one arg would be nice and clean :D ] 

 

 

 

Kind regards,

1 Reply

  • Hello,

     

    Thank you for your post. The "-J" command-line argument controls whether TestCase-level custom properties should be included in the report or not:

     

    This argument doesn't turn on including DataSource, TestSuite-level or Project-level properties. If you would like the current behavior to be changed, please make an improvement request here: https://community.smartbear.com/t5/ReadyAPI-Feature-Requests/idb-p/ReadyAPIFeatureRequests 

     

    Regarding your side note, I agree that if the "-J" argument worked without the "-j" argument, this would be a more straight-forward behavior. If you don't mind, please log a separate improvement request for this.