Changes between Initial Version and Version 1 of DeveloperGuidelines/Testing/Smoke


Ignore:
Timestamp:
04/15/14 00:43:49 (8 years ago)
Author:
Arnav Sharma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Testing/Smoke

    v1 v1  
     1= Smoke Tests =
     2[[TOC]]
     3
     4Smoke Tests click through on every link within Sahana Eden and can be used to check for errors on pages and broken links. They are a light-weight approach to detecting basic errors, however they do not test form submission or any interaction. They can be run using [http://twill.idyll.org/ twill] or [http://jeanphix.me/Ghost.py/ Ghost.py]. Ghost is still under development and offers much more features than Twill.
     5
     6== Installation of the testing environment in your machine ==
     7
     8You should already have installed Eden and Web2py before starting this.
     9* Twill
     10 * Requires [http://twill.idyll.org/ twill].
     11 * Requires [http://wwwsearch.sourceforge.net/mechanize/ mechanize]
     12* Ghost
     13 * Requires [http://pyqt.sourceforge.net/Docs/PyQt4/installation.html PyQt4] or [https://pypi.python.org/pypi/PySide#installation PySide] (dependency of Ghost.py)
     14 * Requires  [http://jeanphix.me/Ghost.py/ Ghost.py]
     15Installation instructions are mentioned on the links
     16
     17== Running / Executing smoke tests: ==
     18
     19To run the smoke tests use the following:
     20{{{
     21python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite smoke  --agent t --force-debug --link-depth 7 -V 3
     22}}}
     23Here,
     24
     25* link-depth - The recursive depth when looking for links
     26* force-debug - Run the smoke tests even if debug is set to true. With debug on it can add up to a second per link and given that a full run of the smoke tests will include thousands of links the difference of having this setting on can be measured in hours.
     27* verbosity, V -  The level of verbose reporting
     28* agent - Agent used to run the smoke tests: g -> Ghost t -> Twill (default)
     29
     30== Issues with Ghost ==
     31* Installing PyQt4/PySide might be troublesome.
     32* Ghost opens a file for every page visited. There is no method to delete the opened files when they are no longer required. If faced with this issue, increase the ulimit of your system as a temporary fix.
     33* Ghost crashes after a while. The reason is not yet clear. The issue is reported [https://github.com/jeanphix/Ghost.py/issues/163 here].
     34* In Mac OS 10.9 [Mavericks], Ghost would throw a warning mentioned below. It is a Qt4 issue.
     35{{{
     36Python[6181:1107] CoreText performance note: Client called CTFontCreateWithName() using name "Helvetica Neue" and got font with PostScript name "HelveticaNeue". For best performance, only use PostScript names when calling this API.
     37}}}
     38== Future work ==
     39* Capitalize the javascript execution capability to improve the smoke tests.
     40* Add an command line argument for Suite.py which takes the path for a file containing the various optional parameters for Ghost such as setting display on, changing wait timeout etc.