| | 20 | |
|---|
| | 21 | Configuration |
|---|
| | 22 | ============= |
|---|
| | 23 | |
|---|
| | 24 | When running BrowserTest directly, you have to adjust config.py to your needs. |
|---|
| | 25 | When integrating it inside another test applications, you will have to provide |
|---|
| | 26 | a module or class that can be used in its place. |
|---|
| | 27 | |
|---|
| | 28 | This file or class should define the following variables: |
|---|
| | 29 | |
|---|
| | 30 | * http_port |
|---|
| | 31 | |
|---|
| | 32 | the port on which the test HTTP server will run |
|---|
| | 33 | |
|---|
| | 34 | * pathprefix |
|---|
| | 35 | |
|---|
| | 36 | all paths that should be handled by the HTTP server will use this prefix |
|---|
| | 37 | to not clash with any paths on the proxied webserver |
|---|
| | 38 | |
|---|
| | 39 | * proxy_host |
|---|
| | 40 | |
|---|
| | 41 | the host name of the proxied webserver |
|---|
| | 42 | |
|---|
| | 43 | * proxy_port |
|---|
| | 44 | |
|---|
| | 45 | the port (string) the proxied webserver listens on |
|---|
| | 46 | |
|---|
| | 47 | * jspath |
|---|
| | 48 | |
|---|
| | 49 | a py.path (see 'Requirements' below) object pointing to the directory |
|---|
| | 50 | containing the JavaScript files (test libraries, etc.) of BrowserTest |
|---|
| | 51 | |
|---|
| | 52 | * testpath |
|---|
| | 53 | |
|---|
| | 54 | py.path object pointing to the directory containing the tests |
|---|
| | 55 | |
|---|
| | 56 | * htmlpath |
|---|
| | 57 | |
|---|
| | 58 | py.path object pointing to the directory containing the HTML files for |
|---|
| | 59 | BrowserTest |
|---|
| | 60 | |
|---|
| | 61 | * browsers |
|---|
| | 62 | |
|---|
| | 63 | a list of strings containing names of browser executables (should be on |
|---|
| | 64 | the path), each of which will be called with a url and then sent a set |
|---|
| | 65 | of tests |
|---|
| | 66 | |
|---|
| | 67 | * reporter |
|---|
| | 68 | |
|---|
| | 69 | the reporter class to use to present results (see 'Reporters' below) |
|---|
| | 70 | |
|---|
| | 71 | * tests |
|---|
| | 72 | |
|---|
| | 73 | a list of tuples, each of which have 4 items: |
|---|
| | 74 | |
|---|
| | 75 | - type of test, can be 'js', 'http' or 'app' (see 'Test types' below) |
|---|
| | 76 | |
|---|
| | 77 | - filename of the test, relative from the tests directory |
|---|
| | 78 | |
|---|
| | 79 | - name of the test, used for identifying the test in output, or in case |
|---|
| | 80 | of ecmaunit tests should be the name of the class to test |
|---|
| | 81 | |
|---|
| | 82 | - additional js paths (strings containing HTTP paths) |
|---|