How do I create a config file and call within FitNesse test suites in Java?
I have multiple FitNesse test suites with repeating url link, and I would like to move those url to a config file and call directly within the FitNesse test suites.
Sample FitNesse tests:
|request payload |${post}|
|keyTab url| 'home/data/file'|
|url|https://google.com|
Recurring URL in all FitNesse tests:
|keyTab url| 'home/data/file'|
|url|https://google.com|
Trying to move the recurring URLs to a config file and call the file within all the FitNesse tests.
- How do I create a XML (config) file for the URLs?
- How do I call the XML file in FitNesse Test Suites?
Does it have to be XML? That would require a custom fixture.
FitNesse does provide the option to load a configuration file that you can provide with the -f filename.properties command line argument (default: plugins.properties).
Apart from FitNesse's own configuration properties, any custom property you provide here, can be accessed using ${propertyName} in the wiki and will be translated to its value.