74 lines
3.2 KiB
Text
74 lines
3.2 KiB
Text
Install WebGUI using to the instructions at: https://github.com/plainblack/webgui/tree/WebGUI8
|
|
|
|
Create the following settings in your test site webgui.conf file:
|
|
|
|
"selenium" : {
|
|
"server" : "localhost",
|
|
"port" : "4444",
|
|
"browser" : "firefox",
|
|
"webgui_url" : "http://whatever-your-site-is.com"
|
|
},
|
|
|
|
Download the Selenium server from: http://seleniumhq.org/download/)
|
|
as of this writing it was selenium-server-standalone-2.24.1.jar
|
|
|
|
Running the Selenium Server (run in a separate command line/window)
|
|
java -jar selenium-server-standalone-2.24.1.jar
|
|
|
|
The -browserSessionReuse is to keep the selenium session open so you may troubleshoot page issues (helpful for test writers)
|
|
The Selenium software automatically closes the browser when the tests are concluded. If you are writing/troubleshooting tests
|
|
and need the browser to remain open use:
|
|
java -jar selenium-server-standalone-2.24.1.jar -browserSessionReuse
|
|
|
|
The test.pl script can setup your WebGUI test site automagically (perl test.pl install)
|
|
or you can setup the WebGUI test site yourself. If you choose to setup the WebGUI site yourself
|
|
please make sure you select all the defaults (do not change the "admin" user password) and
|
|
pick the site design: "Style 03" (This is the style selected for testing)
|
|
|
|
Running the WebGUI tests (run in a separate command line/window)
|
|
cd /data/WebGUI/selenium
|
|
perl test.pl [install]
|
|
|
|
GOTCHAS ---
|
|
If running the selenium tests in the IDE make sure to change:
|
|
<link rel="selenium.base" href="http://webgui.dbash.com" /> TO: <link rel="selenium.base" href="http://whatever-your-site-is.com" />
|
|
perl -pi -e 's/webgui.dbash.com/whatever-your-site-is.com/' *.html
|
|
|
|
Selenium server not running (this may vary according to the values in your webgui.conf file):
|
|
Error requesting http://localhost:4444/selenium-server/driver/:
|
|
500 Can't connect to localhost:4444 (Connection refused)
|
|
|
|
Optional:
|
|
|
|
Download and install the Selenium IDE from: http://seleniumhq.org/projects/ide/
|
|
|
|
Take a look at the Selenium IDE documentation: http://seleniumhq.org/docs/02_selenium_ide.html
|
|
|
|
Youtube videos can be quite handy:
|
|
http://www.youtube.com/watch?v=MXuhevKqImI
|
|
http://www.youtube.com/watch?v=i4NTGUm6oeQ
|
|
http://www.youtube.com/results?search_query=selenium+tutorial+for+beginner
|
|
|
|
Errors:
|
|
|
|
$ perl test.pl
|
|
1..98
|
|
Error requesting http://localhost:4444/selenium-server/driver/:
|
|
500 Can't connect to localhost:4444 (Connection refused)
|
|
# Looks like your test exited with 61 before it could output anything.
|
|
--- this means you forgot to run the Selenium server or you are not running the Selenium server on the same
|
|
host:port as specified in your webgui.conf file.
|
|
|
|
$perl test.pl
|
|
ok 1 - Login test
|
|
Error requesting http://localhost:4444/selenium-server/driver/:
|
|
Timed out after 30000ms
|
|
# Looks like you planned 159 tests but ran 1.
|
|
# Looks like your test exited with 255 just after 1.
|
|
--- make sure your webgui test system is running and the "webgui_url" value in your selenium.conf is the same as the
|
|
address to your WebGUI test system
|
|
|
|
Perl requirements:
|
|
Test::WWW::Selenium
|
|
Test::WWW::Selenium::HTML
|
|
|