JGiven icon indicating copy to clipboard operation
JGiven copied to clipboard

JGiven report don't show some variables on table with testng dataprovider

Open gandadil opened this issue 5 years ago • 3 comments

When I use testng dataprovider and the value of a variable is the same in all tests the report put this value on BDD text and not on Cases list table

For example this is a BDD where de password is the same for all login cases:


   Given I am on login page
    When fill user and password <usuario> 12345678
     And click on login button
     And select company <empresa>
    Then open the home page
     And logoff

  Cases:

   | # | user     | company                          | Status  |
   +---+----------+----------------------------------+---------+
   | 1 | aaaaa    | xxxxxxxx xxxxxxxx xx xxxxxxx xxx | Success |
   | 2 | bbbbbbbb | yyyyyyy yyyyyyyy                 | Success |
   | 3 | cccccc   | yyyyyyyyyy yyyyyyyy              | Success |

On the Cases list, there is no password column because all users have the same password. Is there a way to return all columns even if they have the same value? The same thing is happening on HTML report and I need this info there too.

gandadil avatar Oct 01 '19 16:10 gandadil

Yes, this is expected behavior and one of the main features of JGiven. Why is it important for you to have the password in the table if it is the same for all cases?

janschaefer avatar Oct 04 '19 10:10 janschaefer

Some of my team members was confused when read the results. I did to explain that the values not that was not modified between tests are fixed on BDD. What do you think to always put all fields on Cases table and don't change the behavior of BDD part?

gandadil avatar Oct 04 '19 16:10 gandadil

It is quite difficult to specify which parameters you want to see in the table and which not. So either only the ones are shown that are different between the cases or all parameters are shown. This could be an option.

janschaefer avatar Nov 10 '19 12:11 janschaefer