Changes between Version 24 and Version 25 of DeveloperGuidelines/Testing/Selenium


Ignore:
Timestamp:
06/19/12 14:56:21 (12 years ago)
Author:
graeme
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Testing/Selenium

    v24 v25  
    4545}}}
    4646
    47 Run a single test script for the Eden application:
     47Run a class and all tests in that class:
    4848{{{
    4949cd web2py
    50 python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A mytestfunction
     50python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A -C mytestclass
    5151}}}
     52
     53Run just one test within a class:
     54{{{
     55cd web2py
     56python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A -C mytestclass -M mytestmethod
     57}}}
     58
     59=== Command Line Arguments ===
     60
     61A number of command line arguments have been added and more are being added so to get the latest list of available options use the --help switch, which you can quickly do as follows:
     62{{{
     63python modules/tests/suite.py --help
     64}}}
     65
     66Important options include:
     67
     68-C for class to run
     69
     70-M for test method within a class to run, when you use this option either use the -C option or provide the method in the format class.method
     71
     72If you have HTMLTestRunner installed then a nicely formatted html report will be generated, should you want to disable this then use the --nohtml option. The HTML report will be written to the path given by the switch --html_path which by default will the web2py folder since that is where the tests scripts are run from. The file name will have a timestamp appended to it, if you want you can have just a date by using the option html_name_date.
     73
     74The option --suite will run certain predefined tests. At the moment it supports '''smoke''', which runs a test to look for broken urls otherwise it will run all the tests. If a class or method are selected then this option is ignored.
    5275
    5376== Writing / Creating your own test scripts: ==
     
    90113 * http://zesty.ca/scrape/
    91114  * [http://pycon.blip.tv/file/3261277 Lightning Talk] (2.30)
    92