Skip to content

Commit

Permalink
setup of UI tests
Browse files Browse the repository at this point in the history
This sets up UI tests. It uses behat/mink/selenium to run the tests on
saucelabs.com
Included are some basic tests
1. Login as admin
2. Tests to cover the fix made in PR #26979
  • Loading branch information
individual-it authored and DeepDiver1975 committed Mar 7, 2017
1 parent 8e36c55 commit cac897b
Show file tree
Hide file tree
Showing 17 changed files with 1,327 additions and 13 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ env:
global:
- TEST_DAV=$(tests/travis/changed_app.sh dav)
- TC=litmus-v2
- SRV_HOST_NAME=owncloud
- SRV_HOST_PORT=8888
matrix:
- DB=sqlite

Expand All @@ -26,22 +28,28 @@ addons:
apt:
packages:
- realpath
hosts:
- owncloud
sauce_connect:

before_install:
- make
- sh -c "if [ '$TEST_DAV' = '1' ]; then bash tests/travis/before_install.sh $DB; fi"
- sh -c "if [ '$TEST_DAV' = '1' ] || [ '$TC' = 'selenium' ]; then bash tests/travis/before_install.sh $DB; fi"

install:
- sh -c "if [ '$TEST_DAV' = '1' ]; then bash tests/travis/install.sh $DB; fi"
- sh -c "if [ '$TEST_DAV' = '1' ] || [ '$TC' = 'selenium' ]; then bash tests/travis/install.sh $DB; fi"
- sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/install.sh; fi"

before_script:
- sh -c "if [ '$TC' = 'selenium' ]; then bash tests/travis/start_php_dev_server.sh; fi"

script:
- sh -c "if [ '$TC' = 'syntax' ]; then make test-php-lint ; fi"
- sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
- sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"

- sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/script.sh; fi"
- sh -c "if [ '$TC' = 'selenium' ] && [ ! -z "$SAUCE_USERNAME" ] && [ ! -z "$SAUCE_ACCESS_KEY" ]; then bash tests/travis/start_behat_tests.sh; fi"

matrix:
include:
Expand All @@ -51,6 +59,8 @@ matrix:
env: DB=sqlite;TC=carddav
- php: 5.6
env: DB=sqlite;TC=caldav
- php: 5.6
env: DB=pgsql;TC=selenium
- php: 5.6
env: DB=sqlite;TC=syntax;TEST_DAV=0
- php: 7.0
Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"jakub-onderka/php-console-highlighter": "^0.3.2",
"phpunit/phpunit": "^5.5",
"mikey179/vfsStream": "^1.6",
"behat/mink-extension": "^2.2",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.3",
"sensiolabs/behat-page-object-extension": "^2.0",
"behat/behat": "^3.0",
"jarnaiz/behat-junit-formatter": "^1.3"
},
Expand Down
Loading

0 comments on commit cac897b

Please sign in to comment.