Skip to content

Conversation

@phil-davis
Copy link
Contributor

Description

This is a set-up for frontend test via selenium. The builds are run on travis-ci.org and it triggers selenium tests on sauce labs

This is a PR from a local branch in owncloud/core to demonstrate that the Selenium credentials work when the Travis job is triggered to run tests on a local branch.

#27056 for the PR from a forked repo by @individual-it

Related Issue

#27055 (Proposal to run selenium tests)
#26975 (PR that is not covered by tests, but can be covered by selenium tests)

Motivation and Context

Some bugs are hard to catch with karma & PHPUnit tests. Primarily these are front-end bugs. This PR implements an end-to-end testing environment run on real browsers. Currently only Chrome browser is used, but it can be extended to multiple browsers/platforms including mobile browsers.
Currently @individual-it sauce-labs account is used. Of course it would be good that an oC account would be used in future.

run these tests locally

export SRV_HOST_NAME=localhost
export SRV_HOST_URL=owncloud-core
export SRV_HOST_PORT=80
  • if no webserver is already running start php development server with: bash tests/travis/start_php_dev_server.sh
    it will bind to: $SRV_HOST_NAME:$SRV_HOST_PORT
  • run tests: phpunit --configuration tests/phpunit-selenium-autotest.xml

How Has This Been Tested?

@individual-it joined travis with their own account on sauce labs and has run multiple tests. Created bugs and run tests again to see if they are failing.

Screenshots (if appropriate):

Examples of travis jobs:
https://travis-ci.org/individual-it/owncloud-core/jobs/196827720
https://travis-ci.org/individual-it/owncloud-core/jobs/196571894

Sauce-Labs view:
sauce-lab

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@phil-davis
Copy link
Contributor Author

The credentials fail here because the ownCloud Travis account needs to be set up with the necessary credentials that can access a valid account on SauceLabs.
Anyway, this is now here as an example of Selenium code in a local branch. If the Saucelabs/Selenium approach is discussed and seems the way to go, then someone can setup the credentials in ownCloud Travis and then run the tests here again to confirm it all works.
Please put discussion about Saucelabs/Selenium testing in the original issue #27055 and PR #27056

@phil-davis
Copy link
Contributor Author

Closing this as there will be significant differences in the list of files to be added, after review is done. So no point continuing to have this version for testing.

@phil-davis phil-davis closed this Jan 31, 2017
@phil-davis phil-davis deleted the selenium-test branch January 31, 2017 11:26
@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants