~t7-vla7-lz/psiphon/psiphon

« back to all changes in this revision

Viewing changes to trunk/INSTALL

  • Committer: Eugene Fryntov
  • Date: 2016-11-15 22:13:59 UTC
  • mfrom: (373.1.1 psiphon)
  • Revision ID: e.fryntov@psiphon.ca-20161115221359-f6s56ue1a54n4ijj
merged lp:~t7-vla7-lz/psiphon/psiphon @ 374

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
   utils/   ............................... Utility functions
51
51
 proxy-in-cgi/   .......................... Psiphon in-proxy application
52
52
 sql/   ................................... Database create/upgrade scripts
53
 
 testing/
54
 
   selenium_scripts/   .................... Automated testing scripts
55
53
 tools/   ................................. Install script and translation  
56
54
   langcsv/   ............................. Translation tools
57
55
 www/   ................................... PHP web application
144
142
 
145
143
    sudo install_directory/apache2/bin/apachectl restart
146
144
 
147
 
 
148
 
AUTOMATED TESTING
149
 
------------------------
150
 
 
151
 
Selenium
152
 
 
153
 
 
154
 
- Automated testing of the management web site is done using Selenium.
155
 
 For an introduction, see:
156
 
 http://wiki.openqa.org/display/SIDE/Getting+Started+with+Selenium+IDE
157
 
 http://seleniumhq.org/documentation/core/reference.html
158
 
- Use Selenium IDE in Firefox for most things. Some manual editing necessary.
159
 
- There is one test suite containing many test cases.
160
 
 
161
 
Test suite: selenium_test_suite.html
162
 
 
163
 
Test cases: login.html, profile.html, etc.
164
 
 
165
 
Adding a test case to the suite can be done via Selenium IDE, but reordering
166
 
seems to require manual editing of suite html (easy).
167
 
 
168
 
 
169
 
Enabling Testing
170
 
 
171
 
 
172
 
- Create a symbolic link from www to testing/selenium_scripts.
173
 
 
174
 
The script-driven test method (run_suite.sh) wants the link to be named
175
 
"selenium_scripts", but will create the link itself.
176
 
 
177
 
The web-driven test method (test_start.php) can cope with any link name.
178
 
 
179
 
- (It may also be a requirement that the /testing directory be parallel to the
180
 
  /www directory (as it is in the source tree), but I'm not sure.)
181
 
 
182
 
- Even if the testing code makes it onto a release server, no danger is posed
183
 
  as long as the symbolic link is not there.
184
 
 
185
 
DO NOT put the symbolic link onto a release server.
186
 
 
187
 
Starting Test
188
 
 
189
 
 
190
 
- Script-driven
191
 
 
192
 
Currently only runs test locally, but could be modified.
193
 
 
194
 
Execute run_suite.sh. This will create the required symbolic link and then
195
 
start the test locally.
196
 
 
197
 
- Web-driven
198
 
 
199
 
Navigate to:  http://<server>/<symlink>/test_start.php
200
 
(for example: http://127.0.0.1/selenium_scripts/test_start.php).
201
 
 
202
 
Test will start automatically.
203
 
 
204
 
 
205
 
 
206
 
Test Init/Deinit
207
 
 
208
 
 
209
 
- Overall
210
 
 
211
 
test_init.html and test_deinit.html are test cases at the beginning and end of
212
 
the test suite. They open test_init.php and test_deinit.php, respectively. There
213
 
 are commands in those files to create the test user, etc.
214
 
 
215
 
- Individual Tests
216
 
 
217
 
Rather than all precondition-setup and postcondition-testing being done in the
218
 
suite init/deinit, there should probably be new test cases that load new php
219
 
files (that live in selenium_scripts) that do the pre- and post- work. That
220
 
makes it easy to consider the tests individually.
221
 
 
222
 
Could be called, e.g., pre_profile.html/php and post_profile.html/php.
223
 
 
224
 
 
225
 
Potential Problems
226
 
 
227
 
- Because of anti-XSS javascript restrictions, there will be problems switching
228
 
between http and https (or any domain switching).
 
145
EOF