| 114 | == Smoke Tests == |
| 115 | Smoke testing is preliminary testing to reveal simple failures severe enough to reject a prospective software. In Eden, smoke tests crawl through whole of Eden upto a configurable depth and checks to see if any URL it visits is broken. If broken, it catches the traceback/error (if present) and reports it on the console. It also generates a log file in the folder it is run by the name <timestamp>_smoke_tests_log.txt which contain every URL it visited and its status. |
| 116 | |
| 117 | === How to run smoke tests? === |
| 118 | Smoke tests are present in the testsuite file '''eden/tests/implementation/testsuites/smoke_tests.txt'''. There are various configuration options present at the top of the suite in the `*** Variables ***` section like `MAXDEPTH`, `EXT LINKS`, `START URL`, `ROOT URL` etc. |
| 119 | |
| 120 | Assuming you are in the directory where web2py is located and your eden app is named eden, run this command to run the smoke tests: |
| 121 | {{{ |
| 122 | python web2py.py --no-banner -M -S eden -R applications/eden/tests/edentest_runner.py -A smoke_tests -o NONE -l NONE |
| 123 | }}} |
| 124 | It is advised not to create the log and output file as they are too detailed to be informative. |
| 125 | If any traceback is generated, it will be shown on the command line. The log file that will be generated will contain something like |
| 126 | {{{ |
| 127 | ttp://localhost:8000/eden/default/index - PASSED |
| 128 | http://localhost:8000/eden/admin/index - PASSED |
| 129 | http://localhost:8000/eden/default/person - PASSED |
| 130 | http://localhost:8000/eden/default/user/change_password - FAILED |
| 131 | ... |
| 132 | }}} |
| 133 | |
| 134 | As of right now, smoke tests are a little slow. So, the next step will be to optimize the speed of the smoke tests. |
| 135 | |
| 136 | |