Jump to content

Topic on Talk:Selenium/PHP/Selenium Framework

Roan Kattouw (Catrope)'s feedback to Proposal_for_test_Wiki_configuration

1
Pdhanda (talkcontribs)

I only read the implementation details part, and it looks mostly sane to me. I don't think it's a good idea to have test suite names double as hook names; you could use "SeleniumTest$testsuite" or whatever to avoid scary naming collisions, but even then I think it'd be better to just call something like Selenium::doSetupFor( $testsuite ) (calling a hook makes no sense, because there'd be exactly one listener) and have that function know where to look. The latter could be implemented with a one-dimensional equivalent of $wgHooks (i.e. array( 'testsuite' => xallback ) ) if you like, just don't pollute $wgHooks itself with this that aren't really hooks.

I like how you're doing all this with a cookie, that's smart. It'll break in subtle ways if Squid caching is used (and in even more interesting ways if Selenium is hitting production URLs through Squid). It's possible to fix this, but as far as I'm concerned it can go in the "don't be stupid" category.