简体   繁体   中英

Fitnesse - Getting the absolute path for a fitnesse url

I am busy learning fitnesse at the moment and have not been able to figure out how to work out how to get an absolute path from a relative url. I want to be able to upload test files to the files directory on a fitnesse server and then read those files in my test fixture. eg

public void ReadTextFileContent(string fileName)
{
   Text = File.ReadAllText(fileName);
}

Note: The fileName would be the fully qualified path to the file. I want to be able to define this path in terms of the relative path to the fitnesse server so that in a multi user setup, users will not need to have their fitnesse server running on the same drive or path.

The current directory (System.Environment.CurrentDirectory) will be the path in your FitNesee server -d parameter (eg java -jar \\apps\\fitnesse\\fitnesse.jar -d path\\to\\my\\fitnesse\\wiki). From there you can look in FitNesseRoot\\files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM