DeveloperGuidelinesTesting: test.cmd

File test.cmd, 1.9 KB (added by Fran Boon, 10 years ago)

Non-Interactive

Line 
1c:
2rem Clean Database
3rd /Q /S \bin\web2py\applications\eden\compiled
4del /Q \bin\web2py\applications\eden\databases\*.*
5del /Q \bin\web2py\applications\eden\sessions\*.*
6cd \bin\web2py\applications\eden\models
7sed -i "s/deployment_settings.base.migrate = False/deployment_settings.base.migrate = True/g" 000_config.py
8sed -i "s/deployment_settings.base.prepopulate = False/deployment_settings.base.prepopulate = True/g" 000_config.py
9cd \bin\web2py
10python web2py.py -S eden -M -R applications\eden\static\scripts\tools\noop.py
11rem Configure for Tests
12sed -i "s/deployment_settings.ui.navigate_away_confirm = True/deployment_settings.ui.navigate_away_confirm = False/g" 000_config.py
13sed -i "s/deployment_settings.ui.confirm = True/deployment_settings.ui.confirm = False/g" 000_config.py
14rem Optimise config for speed
15cd \bin\web2py\applications\eden\models
16sed -i "s/deployment_settings.base.migrate = True/deployment_settings.base.migrate = False/g" 000_config.py
17sed -i "s/deployment_settings.base.debug = True/deployment_settings.base.debug = False/g" 000_config.py
18sed -i "s/deployment_settings.base.prepopulate = True/deployment_settings.base.prepopulate = False/g" 000_config.py
19cd \bin\web2py\applications\eden
20mkdir compiled
21cd \bin\web2py
22python web2py.py -S eden -R applications\eden\static\scripts\tools\compile.py
23rem Run Tests
24cd \bin\web2py\applications\eden\tests\selenium\scripts
25start start_selenium.cmd
26ping -n 4 127.0.0.1
27python regressionTests.py local_ff
28rem Restore dev config
29cd \bin\web2py\applications\eden\models
30sed -i "s/deployment_settings.base.migrate = False/deployment_settings.base.migrate = True/g" 000_config.py
31sed -i "s/deployment_settings.base.debug = False/deployment_settings.base.debug = True/g" 000_config.py
32sed -i "s/deployment_settings.base.prepopulate = False/deployment_settings.base.prepopulate = True/g" 000_config.py
33cd ..
34rd /Q /S compiled
35