Sliced browser tests to speed up.

This commit is contained in:
Martin Edenhofer 2015-11-27 10:50:37 +01:00
parent 12e38ea4d1
commit 0361a2e6d2
2 changed files with 70 additions and 3 deletions

View file

@ -160,7 +160,7 @@ job_integration_autowizard:
- ruby -I test/ test/integration/auto_wizard_test.rb || script/build/test_shutdown.sh $RAILS_ENV 3011 3012 1
- script/build/test_shutdown.sh $RAILS_ENV 3011 3012
job_integration_browser_ff:
job_integration_browser_ff_1:
stage: browser
script:
- export RAILS_ENV=production
@ -170,8 +170,9 @@ job_integration_browser_ff:
- export REMOTE_URL=http://192.168.122.175:4445/wd/hub
- export BROWSER=firefox
- export RAILS_SERVE_STATIC_FILES=true
- script/build/test_db_config.sh production ci_zammad_browser_ff
- script/build/test_db_config.sh test ci_zammad_browser_ff_test
- script/build/test_db_config.sh production ci_zammad_browser_ff_1
- script/build/test_db_config.sh test ci_zammad_browser_ff_1_test
- script/build/test_slice_tests.sh 1
- RAILS_ENV=test rake db:create
- script/bootstrap.sh
- rake assets:precompile

View file

@ -0,0 +1,66 @@
#!/bin/bash
LEVEL=$1
if [ "$LEVEL" == '1' ]; then
echo "slicing level 1"
# no ticket action
rm test/browser/agent_user_profile_test.rb
rm test/browser/agent_organization_profile_test.rb
rm test/browser/agent_ticket_*.rb
rm test/browser/prefereces_test.rb
rm test/browser/setting_test.rb
unset MAILBOX_AUTO1
unset MAILBOX_AUTO2
unset MAILBOX_MANUAL1
unset MAILBOX_MANUAL2
elif [ "$LEVEL" == '2' ]; then
echo "slicing level 2"
# only ticket action
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
rm test/browser/agent_organization_profile_test.rb
rm test/browser/agent_user_*.rb
rm test/browser/auth_test.rb
rm test/browser/chat_test.rb
rm test/browser/customer_ticket_create_test.rb
rm test/browser/maintenance_message_test.rb
rm test/browser/manage_test.rb
rm test/browser/prefereces_test.rb
rm test/browser/setting_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/taskbar_session_test.rb
rm test/browser/taskbar_task_test.rb
rm test/browser/switch_to_user_test.rb
unset MAILBOX_AUTO1
unset MAILBOX_AUTO2
unset MAILBOX_MANUAL1
unset MAILBOX_MANUAL2
elif [ "$LEVEL" == '3' ]; then
echo "slicing level 3"
# only profile action
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_ticket_*.rb
rm test/browser/auth_test.rb
rm test/browser/chat_test.rb
rm test/browser/customer_ticket_create_test.rb
rm test/browser/maintenance_message_test.rb
rm test/browser/manage_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/taskbar_session_test.rb
rm test/browser/taskbar_task_test.rb
rm test/browser/switch_to_user_test.rb
else
echo "ERROR: Invalid level $LEVEL - 1, 2 or 3 is available"
exit 1
fi