Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Apr 10, 2018

Requires nextcloud/server#9114 and nextcloud/server#9127

This pull request adds support for acceptance tests to Nextcloud Talk and provides a basic set of tests for conversations (creating conversations, changing and removing them); more tests will be added in following pull requests.

danxuliu added 2 commits April 9, 2018 23:02
This commits adds the base configuration needed to run acceptance tests
for the Talk app.

The script to run the acceptance tests simply calls the "run.sh" script
from the server acceptance tests specifying the directory of the
acceptance tests for the Talk app.

The installation script called before the acceptance tests are actually
run is extended from the one used in the acceptance tests for the server
to also enable the Talk app.

Due to Behat limitations, the Behat configuration used in the acceptance
tests for the server can not be extended; the configuration used is
exclusive for the Talk app. Due to that some parameters must be
duplicated from the Behat configuration for the server acceptance tests
(like the session definitions).

In any case, the core library and all the contexts for the server are
automatically available in the acceptance tests for apps; their path
does not need to be set in the "autoload" section, although the specific
contexts to be used have to be explicitly set; the ones included are
those needed (either directly or due to dependencies) to be able to use
the "I am logged in"/"I am logged in as the admin" steps, which are the
most basic steps needed by the acceptance tests for almost every app.

On the other hand, the paths to the features and the contexts from the
Talk app must be explicitly set in the configuration.

Finally, note that this commit does not include any test feature, so
calling "run.sh" would just end in a failure; some basic test features
will be added in a following commit.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The Talk app requires a multi-threaded web server (due to its use of
long polling), so the configuration of the acceptance tests is changed
to use the Apache web server instead of the default PHP built-in web
server.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu added this to the 4.0 (Nextcloud 14) milestone Apr 10, 2018
@danxuliu danxuliu force-pushed the add-acceptance-tests branch from f5e7d36 to 8cbc5c3 Compare April 10, 2018 22:08
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The acceptance tests requires the grandparent directory of the root
directory of the app to be the root directory of the Nextcloud server.
Drone only clones the app repository, so the Nextcloud server repository
has to be explicitly cloned and the app moved to the "apps" directory
before the tests are run.

Besides that, as the acceptance tests need to be run on Apache,
"/var/www/html" has to be linked to the root directory of the Nextcloud
server.

Once all that is done the tests can be run in the same way that they are
run in Drone for the Nextcloud server but just specifying the acceptance
tests directory too.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@Ivansss Ivansss merged commit 0c159d5 into master Apr 13, 2018
@Ivansss Ivansss deleted the add-acceptance-tests branch April 13, 2018 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants