Skip to content

Conversation

@phil-davis
Copy link
Contributor

Description

This PR modifies the existing small Behat/Selenium/Mink UI testing structure so it is ready to move forward with adding new tests easily.

  1. Provide "skeleton" files that will be a set of default files that new users created in the test environment will have. This will make it easy to construct tests that move, rename, delete, copy etc files.
  2. Modify the structure of the feature/scenario text so that special tags like "AdminLogin" are not needed. Instead of those tags, scenarios that need "givens" can say things like:
Given a regular user exists
Given I am logged in as admin

This makes it easy to use the "natural language" of Behat's BDD implementation, without messing with special tags to make variable scenario setup happen.
3. Provide some infrastructure for creating users, so that the scenario steps can just say stuff like:

Given a regular user exists

and the underneath code will create an ordinary user that the scenario can use. Then at the end of the scenario the user gets removed by the AfterScenario code, ensuring isolation between scenarios.
4. Cleanup whitespace at end of lines - easy to tidy everything up now and it is ready to move forward with future minimal diffs.

Related Issue

#27858

Motivation and Context

Having automated UI tests will give more immediate feedback if a change has broken the end-to-end UI behavior in some way. It will also reduce the load of manual testing needed.

How Has This Been Tested?

The code has been tried in a separate repo to make sure that Travis and SauceLabs process it successfully.
The Travis build/test steps should also run and pass here once the PR is submitted.

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.

Documentation on how to run this test environment on a local machine is under review at owncloud-archive/documentation#3049

@phil-davis
Copy link
Contributor Author

:( Jenkins seems to be unhappy with all the recent PRs.
What is that all about?

@DeepDiver1975
Copy link
Member

What is that all about?

here has been an issue with the docker container to fire up - I just restarted it

@phil-davis
Copy link
Contributor Author

It is still not happy:

15:08:17 Fire up the mysql docker
15:08:18 Waiting for MySQL(utf8mb4) initialisation ...
15:18:20 ........................................................................................................................................................................................................
15:18:20 [ERROR] Waited 600 seconds, no response

@DeepDiver1975 DeepDiver1975 self-requested a review May 12, 2017 08:59
@DeepDiver1975 DeepDiver1975 added this to the 10.0.1 milestone May 12, 2017
@phil-davis
Copy link
Contributor Author

Note: "use preseedconfig to set lang & skeleton and not autoconfig" 11ca7e9 added by @individual-it to fixup/improve getting the skeleton files in place correctly.

@PVince81
Copy link
Contributor

Jenkins slept again... 😴

@DeepDiver1975
Copy link
Member

@phil-davis there are conflicts in here - please rebase - thx

@DeepDiver1975 DeepDiver1975 modified the milestones: 10.1, 10.0.1 May 17, 2017
@phil-davis
Copy link
Contributor Author

phil-davis commented May 17, 2017

@DeepDiver1975 GitHub is telling me "This branch has no conflicts with the base branch"???
The merge commit below did its thing without complaint, and in the end needed to make no changes. Anyway, it will run the build/tests again...
And the IE job got "The Sauce VMs failed to start the browser or device. For more info, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages " which is rubbish, and roughly translates to "SauceLabs no longer likes Win7 and IE so we just won't start it up right now", a perfectly reasonable policy ;). I clicked "Restart Job" in Travis and now it started and the tests seem to be progressing using IE.

@phil-davis
Copy link
Contributor Author

@DeepDiver1975 or @SergioBertolinSG IMHO this is ready to get a review tick and merging.

@phil-davis
Copy link
Contributor Author

@DeepDiver1975 sorry to harass! @individual-it is getting quite a few changes that he has ready that branch off here, assuming this code will be reviewed soon (and hopefully merged in something similar to the shape it is in).
Any chance to get a review/merge soon?

@SergioBertolinSG
Copy link
Contributor

@phil-davis we are currently quite busy with the next release. Review will come after it, thanks for your patience.

@PVince81
Copy link
Contributor

@phil-davis @individual-it you guys can also review each other's code ?

@phil-davis
Copy link
Contributor Author

Hmmm - that seems a bit odd for ones where we have already worked on bits of it "together" and commits are there from both of us, or actually one of us "summarized" code that both of us worked. It is a bit difficult to be independent when reviewing! But yeh, if you are happy, then when one of us has done something, the other can review it.
The other thing is that until we have more experience with the accepted coding standards for ownCloud, it is good to get review from someone with more coding experience on the project - to make sure we do not go off in a direction that does not fit nicely with other parts of the code/test infrastructure.

@PVince81
Copy link
Contributor

Ah, I didn't realize that many commits were from two people writing them 😄

My comment was mostly for separate work.

@phil-davis
Copy link
Contributor Author

@PVince81 I saw your other comments now on PRs that are based on this. So we should merge this one now, let CI do whatever it does on master, then the others should each slide in nicely on top.

@individual-it
Copy link
Member

before making a PR to oC @phil-davis & me, we do peer-review stuff "internally"

@individual-it individual-it merged commit 14252ec into master May 18, 2017
@individual-it individual-it deleted the setup-for-ui-tests branch May 18, 2017 12:32
@phil-davis phil-davis restored the setup-for-ui-tests branch May 18, 2017 12:54
@phil-davis phil-davis deleted the setup-for-ui-tests branch May 18, 2017 12:56
@DeepDiver1975 DeepDiver1975 modified the milestones: 10.1, development Oct 10, 2017
@lock
Copy link

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

6 participants