Can FitNesse page tags be used in page?

心已入冬 提交于 2021-01-29 05:17:18

问题


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:


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)


来源:https://stackoverflow.com/questions/64765404/can-fitnesse-page-tags-be-used-in-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!