From: Chris Nehren Date: Fri, 8 Apr 2011 05:17:41 +0000 (-0400) Subject: rearrange API X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FTest-Harness-Selenium.git;a=commitdiff_plain;h=6133f01294e35ad6bdfc4f19b94e5549c60ea931 rearrange API --- diff --git a/apiv2 b/apiv2 index 151dab9..725bb83 100644 --- a/apiv2 +++ b/apiv2 @@ -1,21 +1,38 @@ +* stuff users call + sub new(%hash) browser => which browser to test - browser_url => base of app - $ENV{SELENIUM_HOST/_PORT} || host/port => selenium server - env vars mean to take existing server, host/port args mean to start with xvnc + app_base => base of app + $ENV{SELENIUM_RC_HOST/_PORT_START} || $selenium_rc{qw/host port start} + these are used for finding where to run the selenium RC server + default of selenium_rc => { host => 'localhost', port => 6900+$UID, start => 1 } + +method test_directory($dir) + finds HTML files in $dir, calls run_tests_for on them + starts necessary servers as appropriate + +* stuff THS calls, users might call -method start_server +method start_selenium_server starts the selenium server if local, otherwise tries to connect to it -method stop_server +method stop_selenium_server derp -method test_directory($dir) - finds HTML files in $dir, calls run_tests_for on them +method start_app_server + starts the associated Cat server + +method stop_app_server + derp method run_tests_for($html_file) uses Socialtext::WikiFixture::Selenese to run $html_file against selenium server +* private stuff + method _get_rows_for($html_file) reads $html_file and returns data that S::WF::S understands + +method DESTROY + shuts down servers as appropriate