Skip to content

Conversation

@individual-it
Copy link
Member

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

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 this are front-end bugs. This PR implements 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 my own sauce-labs account is used. Of course it would be good that a oC account would be used in future.

run this 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?

I've joined travis with my own account on sauce labs and 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.

@mention-bot
Copy link

@individual-it, thanks for your PR! By analyzing the history of the files in this pull request, we identified @DeepDiver1975 and @PVince81 to be potential reviewers.

@phil-davis
Copy link
Contributor

Note: The Selenium tests cannot get started in this PR because the pull is from a separate repo, and Travis does not export the credentials, as documented at https://docs.travis-ci.com/user/pull-requests
But it should all work if this code is put in a local branch of owncloud/core and a PR done from there.

Otherwise SauceLabs credentials would have to be put in the clear somewhere, and anyone could then take them and run lots of SauceLabs jobs using them. That would open a DOS vector, where a malevolent person could clog up the SauceLabs account with lots of irrelevant jobs, delaying genuine jobs.

@PVince81
Copy link
Contributor

@owncloud/qa @DeepDiver1975 @felixboehm

@phil-davis
Copy link
Contributor

See #27058 for a local branch with this code. The tests still do not run, but that is because credentials for SauceLabs would need to be added to the ownCloud Travis account.

@DeepDiver1975 DeepDiver1975 added this to the 10.0 milestone Jan 31, 2017
@individual-it
Copy link
Member Author

closing this in favour of a behat based solution
see discussion in PR #27057

@lock
Copy link

lock bot commented Aug 3, 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 3, 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.

5 participants