On Mon, 06 Sep 2010 23:15:06 -0400, Mark A. Hershberger wrote:
Dan Nessett dnessett@yahoo.com writes:
Last Friday, mah ripped out the globals and put the configuration information into the execute method of RunSeleniumTests.php with the comment "@todo Add an alternative where settings are read from an INI file." So, it seems we have dueling developers with contrary ideas about what is the best way to configure selenium framework tests.
I'm opposed to increasing global variables and I think I understand Tim's concern about configuring via a PHP file.
I plan to start work on reading the configuration from an INI file (*not* a PHP file).
Either approach works. But, by going back and forth, it makes development of functionality for the Framework difficult.
I agree.
The idea I was pursuing is to encapsulate configuration in a Selenium object that (right now) RunSeleniumTests.php will set up.
Platonides suggestion of a hook to provide configuration is also doable.
Mark.
I am pretty much agreeable to any solution that remains stable. One thing that may not be obvious is there may be configuration data over and above that specified on the RunSeleniumTests command line.
For example, it is inconvenient to have to start up the selenium server before running RunSeleniumTests. (In the past I have frequently executed RunSeleniumTests only to get an error because I forgot to start the server). I supplied a patch to Markus recently that adds two options to the command line, one to start the server and the other to stop it (the patch supplies functionality only for *nix systems, which is probably why Markus has not committed it - there needs to be similar support for Windows). This functionality requires a directory path to the selenium server jar file. This is not something that a tester would normally supply on a command line. It is a system, not a test run parameter.
So, I hope the INI file processing you are working on will allow the specification of such data.