Hi,

since the wiki under test is not neccessarily the wiki running the test, it 
might be useful to visualize that (I have numbered the individual steps to make 
reference to them easier in the discussion):

testrunner                     wiki under test
----------                     ---------------
1.1 start selenium which in 
turn starts a browser to
talk to the wiki under
test
1.2 send request for new test
with unique test id and tests
that will be fired         
                               2.1 create cookie with test id
                               2.2 create temporal resources 
                               according to tests list
                               2.3 create test tracker with timestamp
                               2.4 return success code
3.1 start testsuites via selenium
3.2 send a lot of individual 
requests according to the tests
                               4.1 testrunner is identified by test id
                               4.2 reconfigure database and resources
                               according to test id
                               4.3 ? Do something with memcached ?
                               4.4 execute request
                               4.5 update timestamp in test tracker
5.1 send a teardown request
                               6.1 execute teardown, i.e. delete
                               all resources associated with 
                               test id
                               6.2 delete test tracker
                               6.3 return success code
7.1 stop selenium

Now, if something breaks during the test, the test tracker will not be deleted 
and can serve as as basis for a cleanup procedure that is triggered by a 
cronjob.

Is this something we can all agree on? I assume, steps 2.2 (setting up 
temporary test data) and 4.2 (find a mechanism to actually use the test data) 
will be the ones we have to work on now.

Regards,
Markus


-----Ursprüngliche Nachricht-----
Von: wikitech-l-boun...@lists.wikimedia.org 
[mailto:wikitech-l-boun...@lists.wikimedia.org] Im Auftrag von Ryan Lane
Gesendet: Freitag, 24. September 2010 20:22
An: Wikimedia developers
Betreff: Re: [Wikitech-l] using parserTests code for selenium test framework

> Here is all that is required:
> * a single wildcard entry in Apache configuration
> * one or two lines in LocalSettings.php to pull a DB name from the 
> hostname/path/CLI parameters.
>
> As for cleaning up resources to keep the machine from getting clogged, 
> it's very unlikely that your test wikis will fill up a 
> multi-hundred-gigabyte drive in the middle of a run. If you find that 
> they do, there's still no need to tie cleanup of any particular run to 
> any particular other run.
>
> All you need to know is which runs have completed and can now be cleaned up.
>

I'd like to add some ideas to this thread that were discussed in the Selenium 
meeting this morning. The basic plan we discussed (and I'm sure I'll be 
corrected some on this) is as follows:

When a run begins, it registers itself with the wiki and gets a session back. 
The wiki software, on creating the session, makes a new run specific wiki using 
the wiki family method. The test will pass both the session cookie, and a test 
type cookie, which will dynamically configure the wiki as the tests run. When 
the run is complete, it should notify the wiki that the test run is complete. 
The wiki software will then destroy the session and the dynamically created 
resources. If a run doesn't complete for some reason, a cron can clean up 
resources that haven't been used in some appropriate amount of time.

Respectfully,

Ryan Lane

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to