Can FitNesse page tags be used in page?

144 Views Asked by At

Is there a way in FitNesse to access page tags from inside the page?

I need to change database connection strings at test start-up and would like to use a tag as a switch.

1

There are 1 best solutions below

0
Fried Hoeben On BEST ANSWER

I would recommend that you create multiple top level suites, one for each environment (e.g. one for testing locally and one for Azure) that defines the environment specific settings using wiki symbols (i.e. !define ...). The tests that are to be executed in all environments can be defined is separate suite that is included in each environment's suite using a symbolic link. The tests in the shared suites use the wiki symbols to get the values for the environment they are included in.

  • This makes it explicit which settings are different between each environment
  • All different environments are visible in the wiki
  • Adding or removing an environment setting requires no (fixture) code changes
  • You can add environment specific tests for each environment (just add them to the environment's suite besides the shared tests included via symbolic link)