Cucumber: Debugging models - convio/watirmark GitHub Wiki

In the course of developing a new feature file or debugging a test that failed, you might want to temporarily force models to use a given set of values. There's a step 'debug_model' that allows you to do this.

  Background: 
    Given debug model
      | model_name | keyword_name | value | 

The model_name can be an asterisk if you want to apply that value to all models. So for example you could do something like:

  Background: 
    Given debug model
      | *                | teamraisername | tr_12345    | 
      | ConstituentModel | first_name     | first_12345 | 
      | ConstituentModel | last_name      | last_12345  | 

So for the ConstituentModel we'd override the first and last name and let the remaining fields be what they would normally be and for all models, teamraisername would always get set to tr_12345.

This may not handle every use case so let us know if there's something you want to do that this doesn't cover. It's a fairly rudimentary search/replace for now.