2009-07-23 19:39:05 +04:00
|
|
|
To run the monotesting framework, it's easiest to have the needed options
|
|
|
|
in a config file. You do not have to create these files however.
|
|
|
|
The framework will allow you to set these options via the command
|
|
|
|
line. See --help
|
|
|
|
|
|
|
|
The two config files look like so:
|
2009-03-25 02:20:54 +03:00
|
|
|
|
2009-06-18 07:45:07 +04:00
|
|
|
$ cat ~/.testopia_creds.conf
|
2009-03-26 01:48:03 +03:00
|
|
|
|
2009-06-18 07:45:07 +04:00
|
|
|
[testopia]
|
2009-06-23 20:08:49 +04:00
|
|
|
# Do not use quotes for username or password
|
2009-06-18 19:40:24 +04:00
|
|
|
username=youruser
|
|
|
|
password=yourpassword
|
2009-03-26 01:48:03 +03:00
|
|
|
|
2009-07-23 19:39:05 +04:00
|
|
|
$ cat ./common/defaults.conf
|
2009-03-26 01:48:03 +03:00
|
|
|
|
2009-06-18 07:45:07 +04:00
|
|
|
[main]
|
2010-08-18 22:15:19 +04:00
|
|
|
base_url = http://localhost
|
|
|
|
testrunid = None
|
2009-03-26 01:48:03 +03:00
|
|
|
|
|
|
|
xsp1_port = 8081
|
|
|
|
xsp2_port = 8082
|
2010-08-18 22:15:19 +04:00
|
|
|
xsp4_port = 8084
|
2009-03-26 01:48:03 +03:00
|
|
|
graffiti_port = 8083
|
2009-06-20 00:23:19 +04:00
|
|
|
apache_port = 80
|
2009-03-26 01:48:03 +03:00
|
|
|
|
2009-06-18 19:40:24 +04:00
|
|
|
rc_server = localhost
|
2009-06-18 07:45:07 +04:00
|
|
|
rc_port = 4444
|
2009-06-18 19:40:24 +04:00
|
|
|
rc_browser = *firefox
|
2009-06-18 07:45:07 +04:00
|
|
|
|
2009-03-26 04:19:26 +03:00
|
|
|
debug = False
|
2009-06-18 07:45:07 +04:00
|
|
|
logfile = None
|
2009-03-26 04:19:26 +03:00
|
|
|
|
2009-03-26 01:48:03 +03:00
|
|
|
|
|
|
|
####################################################################
|
2009-03-25 02:20:54 +03:00
|
|
|
Setting up the selenium server:
|
|
|
|
|
|
|
|
Download the selenium rc server from http://seleniumhq.org/download/
|
2010-09-01 21:13:38 +04:00
|
|
|
Unzip the file and cd into selenium-remote-control-1.0.3/selenium-server-1.0.3
|
2009-03-25 02:20:54 +03:00
|
|
|
|
|
|
|
Run the selenium server with this command
|
|
|
|
|
2009-03-30 21:37:51 +04:00
|
|
|
$ java -jar selenium-server.jar -forcedBrowserModeRestofLine *firefox3 /usr/lib/firefox/firefox [options]
|
2009-03-25 17:32:33 +03:00
|
|
|
|
|
|
|
Are there any firefox options that we can use to increase preformance?
|
2009-03-25 02:20:54 +03:00
|
|
|
|
|
|
|
|
2009-03-26 01:48:03 +03:00
|
|
|
####################################################################
|
2009-03-25 02:20:54 +03:00
|
|
|
Optional:
|
|
|
|
|
|
|
|
Download the selenium-core from http://seleniumhq.org/download/
|
|
|
|
Unzip the file on the test server machine
|
|
|
|
Link the selenium-core directory to the xsp tests directory
|
|
|
|
|
|
|
|
# Note the name change in the link
|
|
|
|
$ ln -s /home/users/linux/selenium-core /usr/share/mono/lib/xsp/tests/selenium-server
|
|
|
|
|
|
|
|
This url should resolve properly:
|
|
|
|
http://<testserver>.mono.lab.novell.com:8080/selenium-server/core/Blank.html
|
|
|
|
|
2009-06-10 07:47:11 +04:00
|
|
|
|
|
|
|
####################################################################
|
2010-09-01 21:13:38 +04:00
|
|
|
Xephyr
|
2009-06-10 07:47:11 +04:00
|
|
|
|
|
|
|
You can tell selenium to use Xvfb when displaying firefox, so you can
|
2010-09-01 21:13:38 +04:00
|
|
|
continue working on your desktop
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
# Start Xephyr with it's display set to :1
|
|
|
|
export DISPLAY=:0.0
|
|
|
|
Xephyr -screen 1200x900 -ac :1
|
|
|
|
|
2009-06-10 07:47:11 +04:00
|
|
|
|
2010-09-01 21:13:38 +04:00
|
|
|
Then in seperate script, start selenium:
|
2009-06-10 07:47:11 +04:00
|
|
|
|
|
|
|
|
2010-09-01 21:13:38 +04:00
|
|
|
#!/bin/sh
|
|
|
|
export DISPLAY=:1
|
|
|
|
cd /path/to/selenium-remote-control-1.0.3/selenium-server-1.0.3
|
|
|
|
java -jar selenium-server.jar -forcedBrowserModeRestofLine *firefox /usr/lib64/firefox/firefox
|
2009-06-10 07:47:11 +04:00
|
|
|
|
2009-03-26 04:19:26 +03:00
|
|
|
##################################################################
|
2009-03-27 22:41:39 +03:00
|
|
|
Design Patterns
|
2009-03-26 04:19:26 +03:00
|
|
|
|
2009-03-27 21:55:42 +03:00
|
|
|
See qa/selenium/xsp1/web_service/test_service/addTest.py for design patterns
|
2010-09-01 21:13:38 +04:00
|
|
|
and naming conventions
|
2009-03-27 20:45:48 +03:00
|
|
|
|
|
|
|
##################################################################
|
|
|
|
Project Rules
|
|
|
|
|
2010-09-01 21:13:38 +04:00
|
|
|
* For every test .py file, there should be a corresponding .html that contains the
|
|
|
|
selenium IDE importable test case
|
2009-03-27 20:45:48 +03:00
|
|
|
* Each .py file in the project (other than the selenium, testopia and empty
|
|
|
|
files), needs to have a vim mode line as the very last line of the file. See
|
|
|
|
qa/selenium/xsp1/web_service/test_service/addTest.py for an example modeline.
|
|
|
|
|
2009-05-26 22:31:57 +04:00
|
|
|
# vim:ts=4:expandtab:
|