Surely someone else has run into this problem. I'm trying to figure out how to loop through Firefox, Chrome, and IE in conjunction with nose.
Right now I have:
- "setup.cfg" file that specifies browsers
- a "common.py" that reads from the config file
- my actual "test.py" files that imports "common.py" and can reference global variables in it
The main trouble seems to be how to pass in the browser/driver into the setUp methods of the unittest.TestCase class.
One possible solution is to sub-class, and have a class for each browser. In that case I'm duplicating my test code three times, though, which is ugly.
Another possibility is to run nose in code. But I'm unsure how I would read the arguments from it inside my files.