1

I have a scenario outline with an example table with multiple rows having unique test parameters that are being used for given statement and then statement table for verification. Basically when the scenario gets run with the first row of examples table, I want to use the first row of then table to verify the result and so on.

Is it possible to do this? If not should I go with another scenario design?

Feature: MyFuture  

@Do something  
Scenario Outline: Verify bla bla    
    Given run I ... with <jj>,<kk>,<ll>  
    Then verify the following  
    | aa  |  bb | cc |  
    | d   |  e  | f  |  
    | g   |  h  | i  | 

Examples:  
    | jj | kk | ll |  
    | m  | n  | o  |  
    | p  | q  | r  |     
  • 1
    Technically instead of using a THEN table I can add it to Examples table but in that case I have to create multiple then statements (I have 8 then statements) and if one of them gets failed, the remaining then statements do not get asserted. That's why I want to use one single then table to insert all my assertions using Assert.Multiple.. so I can check if the remaining tests are failed or passed instead of skipping. – Ike E. Aug 9 '19 at 14:56
0

Add your assertions to the examples table, and reference them in the Then step:

Feature: MyFuture  

@Do something  
Scenario Outline: Verify bla bla    
    Given run I ... with <jj>,<kk>,<ll>  
    Then verify the following: <aa>, <bb>, <cc>

Examples:
    | jj | kk | ll | aa | bb | cc |
    | m  | n  | o  | d  | e  | f  |
    | p  | q  | r  | g  | h  | i  |
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.