mercredi 13 juin 2018

how can I randomize the steps order of Cucumber?

How can I randomize the fastest method /way to do?:

 Scenario Outline: As an Piet i can delete users
    Given the user is logged in as 'Piet'
    Given the menu item 'user management' is selected
    When the user '<username>' is deleted
    Then the notification panel contains the message 'Deze gebruiker is 
  succesvol verwijderd.'
    And the notification panel contains no errors

#randomize order of delete

    Examples: User accounts to delete
      | username      |
      | hans          |
      | piet          |
      | kees          |
      | jan           |

I expected Cucumber to support something like this: (but apparently it doesn't , at least not yet)

 Scenario Outline: As an Piet i can delete users
    Given the user is logged in as 'PIET'
    Given the menu item 'user management' is selected
    When the user '<username>' is deleted
    Then the notification panel contains the message 'Deze gebruiker is 
 verwijderd.'
    And the notification contains no errors

#randomize order of delete

    Examples: User accounts to delete
      | username [RANDOM] |
      | hans              |
      | piet              |
      | kees              |
      | jan               |

so what is the best way to get these steps run in a random order?




Aucun commentaire:

Enregistrer un commentaire