Skip to content

Instantly share code, notes, and snippets.

@mrtns
Last active January 2, 2016 16:09
Show Gist options
  • Save mrtns/8328388 to your computer and use it in GitHub Desktop.
Save mrtns/8328388 to your computer and use it in GitHub Desktop.
Multi environment, multi tenant, multi language BDD specifications, scenarios

Approaches

  • Write a single spec. Script multiple runs. Use tags to define which scenarios to execute on each run
  • Write a single spec. Script multiple runs. Use spec tables to define different assertions to perform on each run
  • Write a spec. Duplicate a spec for each variation. Set up run in Using block of spec

Notes

Variations

  • envrionment
  • tenant
  • language
  • device?

Scenario Definitions

  • scenario with no tenant table
  • scenario with tenant table

Runtime Configuration

  • current tenant
  • current tenant is defined in scenario tenant table

Specs

Scenario Tags

  • When a scenario does not have an @environment_ tag defined, it should be run against any/every environment
  • When a scenario does not have a @tenant_ tag defined, it should be run againt any/every tentant
  • When a scenario does not have a @language_ tag defined, it should be run against any/every language

Scenario Steps

  • When a step does not have a 'target' table defined, it should be run against any/every target
  • When a step has a 'targets' table defined, it should select the appropriate value from the targets definitions. if no definition exists for current context, it should use the 'all' target. if no 'all' target is defined, it should ??

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment