nextcloud/tests/acceptance/config/behat.yml

108 lines
2.9 KiB
YAML
Raw Normal View History

default:
suites:
default:
paths:
- "%paths.base%/../features"
contexts:
- ActorContext
Add helper context to isolate the test server with Docker containers Scenarios in acceptance tests must be independent one of each other. That is, the execution of one scenario can not affect the execution of another scenario, nor it can depend on the result of the execution of a different scenario. Each scenario must be isolated and self-contained. As the acceptance tests are run against a Nextcloud server the server must be in a known and predefined initial state each time a scenario begins. The NextcloudTestServerContext is introduced to automatically set up the Nextcloud test server for each scenario. This can be achieved using Docker containers. Before an scenario begins a new Docker container with a Nextcloud server is run; the scenario is then run against the server provided by the container. When the scenario ends the container is destroyed. As long as the Nextcloud server uses local data storage each scenario is thus isolated from the rest. The NextcloudTestServerContext also notifies its sibling RawMinkContexts about the base URL of the Nextcloud test server being used in each scenario. Although it uses the Behat context system, NextcloudTestServerContext is not really part of the acceptance tests, but a provider of core features needed by them; it can be seen as part of a Nextcloud acceptance test library. Therefore, those classes are stored in the "core" directory instead of the "bootstrap" directory. Besides its own (quite limited) autoload configuration, Behat also uses the Composer autoloader, so the "core" directory has to be added there for its classes to be found by Behat. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-04 17:11:34 +03:00
- NextcloudTestServerContext
- AppNavigationContext
- AppSettingsContext
- AppsManagementContext
- CommentsAppContext
- ContactsMenuContext
- DialogContext
- FeatureContext
- FileListContext
- FilePickerContext
- FilesAppContext
- FilesAppSharingContext
- LoginPageContext
- NotificationsContext
- PublicShareContext
- SearchContext
- SettingsContext
- SettingsMenuContext
- ThemingAppContext
- ToastContext
- UsersSettingsContext
filters:
tags: "~@apache"
apache:
paths:
- "%paths.base%/../features"
contexts:
- ActorContext
- NextcloudTestServerContext:
nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper
- AppNavigationContext
- AppSettingsContext
- AppsManagementContext
- CommentsAppContext
- ContactsMenuContext
- DialogContext
- FeatureContext
- FileListContext
- FilePickerContext
- FilesAppContext
- FilesAppSharingContext
- LoginPageContext
- NotificationsContext
- PublicShareContext
- SearchContext
- SettingsContext
- SettingsMenuContext
- ThemingAppContext
- ToastContext
- UsersSettingsContext
filters:
tags: "@apache"
extensions:
Behat\MinkExtension:
sessions:
default:
selenium2:
wd_host: %selenium.server%
Update acceptance tests to Selenium 3 The acceptance tests used the last Selenium 2 Docker container available, which provides a rather old Firefox version (Firefox 47). Nevertheless, despite some rendering issues, most things still worked as expected due to the JavaScript files being built with support for older browsers. However, now that support for Internet Explorer 11 and older browsers will be dropped things could start to fail, so a newer browser (and thus a newer Selenium version) should be used in the acceptance tests. Selenium has been standardized by the W3C, and the protocol to communicate between the Selenium server and the browser has changed due to that. Firefox >= 48 only supports the new W3C protocol, but the Selenium driver for Mink does not support it yet. The old protocol can still be used in recent Chromium/Chrome versions by explicitly forcing it, so for the time being the acceptance tests will need to be run on Chrome instead (although Firefox provides some interesting features like the fake streams that would be needed to test calls in Talk, so they should be moved again to Firefox once possible). Finally, the default shm size of Docker is 64 MiB. This does not seem enough to run newer Chrome releases and causes the browser to randomly crash during the tests ("unknown error: session deleted because of page crash" is shown in the logs). Due to this "disable-dev-shm-usage" needs to be used so Chrome writes shared memory files into "/tmp" instead of "/dev/shm" (the default shm size of Docker could have been increased instead using "docker run --shm-size...", but that seems to be problematic when the container is run in current Drone releases). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-06 17:05:54 +03:00
browser: "chrome"
capabilities:
extra_capabilities:
goog:chromeOptions:
args: ["disable-dev-shm-usage"]
w3c: false
John:
selenium2:
wd_host: %selenium.server%
Update acceptance tests to Selenium 3 The acceptance tests used the last Selenium 2 Docker container available, which provides a rather old Firefox version (Firefox 47). Nevertheless, despite some rendering issues, most things still worked as expected due to the JavaScript files being built with support for older browsers. However, now that support for Internet Explorer 11 and older browsers will be dropped things could start to fail, so a newer browser (and thus a newer Selenium version) should be used in the acceptance tests. Selenium has been standardized by the W3C, and the protocol to communicate between the Selenium server and the browser has changed due to that. Firefox >= 48 only supports the new W3C protocol, but the Selenium driver for Mink does not support it yet. The old protocol can still be used in recent Chromium/Chrome versions by explicitly forcing it, so for the time being the acceptance tests will need to be run on Chrome instead (although Firefox provides some interesting features like the fake streams that would be needed to test calls in Talk, so they should be moved again to Firefox once possible). Finally, the default shm size of Docker is 64 MiB. This does not seem enough to run newer Chrome releases and causes the browser to randomly crash during the tests ("unknown error: session deleted because of page crash" is shown in the logs). Due to this "disable-dev-shm-usage" needs to be used so Chrome writes shared memory files into "/tmp" instead of "/dev/shm" (the default shm size of Docker could have been increased instead using "docker run --shm-size...", but that seems to be problematic when the container is run in current Drone releases). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-06 17:05:54 +03:00
browser: "chrome"
capabilities:
extra_capabilities:
goog:chromeOptions:
args: ["disable-dev-shm-usage"]
w3c: false
Jane:
selenium2:
wd_host: %selenium.server%
Update acceptance tests to Selenium 3 The acceptance tests used the last Selenium 2 Docker container available, which provides a rather old Firefox version (Firefox 47). Nevertheless, despite some rendering issues, most things still worked as expected due to the JavaScript files being built with support for older browsers. However, now that support for Internet Explorer 11 and older browsers will be dropped things could start to fail, so a newer browser (and thus a newer Selenium version) should be used in the acceptance tests. Selenium has been standardized by the W3C, and the protocol to communicate between the Selenium server and the browser has changed due to that. Firefox >= 48 only supports the new W3C protocol, but the Selenium driver for Mink does not support it yet. The old protocol can still be used in recent Chromium/Chrome versions by explicitly forcing it, so for the time being the acceptance tests will need to be run on Chrome instead (although Firefox provides some interesting features like the fake streams that would be needed to test calls in Talk, so they should be moved again to Firefox once possible). Finally, the default shm size of Docker is 64 MiB. This does not seem enough to run newer Chrome releases and causes the browser to randomly crash during the tests ("unknown error: session deleted because of page crash" is shown in the logs). Due to this "disable-dev-shm-usage" needs to be used so Chrome writes shared memory files into "/tmp" instead of "/dev/shm" (the default shm size of Docker could have been increased instead using "docker run --shm-size...", but that seems to be problematic when the container is run in current Drone releases). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-06 17:05:54 +03:00
browser: "chrome"
capabilities:
extra_capabilities:
goog:chromeOptions:
args: ["disable-dev-shm-usage"]
w3c: false
Jim:
selenium2:
wd_host: %selenium.server%
Update acceptance tests to Selenium 3 The acceptance tests used the last Selenium 2 Docker container available, which provides a rather old Firefox version (Firefox 47). Nevertheless, despite some rendering issues, most things still worked as expected due to the JavaScript files being built with support for older browsers. However, now that support for Internet Explorer 11 and older browsers will be dropped things could start to fail, so a newer browser (and thus a newer Selenium version) should be used in the acceptance tests. Selenium has been standardized by the W3C, and the protocol to communicate between the Selenium server and the browser has changed due to that. Firefox >= 48 only supports the new W3C protocol, but the Selenium driver for Mink does not support it yet. The old protocol can still be used in recent Chromium/Chrome versions by explicitly forcing it, so for the time being the acceptance tests will need to be run on Chrome instead (although Firefox provides some interesting features like the fake streams that would be needed to test calls in Talk, so they should be moved again to Firefox once possible). Finally, the default shm size of Docker is 64 MiB. This does not seem enough to run newer Chrome releases and causes the browser to randomly crash during the tests ("unknown error: session deleted because of page crash" is shown in the logs). Due to this "disable-dev-shm-usage" needs to be used so Chrome writes shared memory files into "/tmp" instead of "/dev/shm" (the default shm size of Docker could have been increased instead using "docker run --shm-size...", but that seems to be problematic when the container is run in current Drone releases). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-06 17:05:54 +03:00
browser: "chrome"
capabilities:
extra_capabilities:
goog:chromeOptions:
args: ["disable-dev-shm-usage"]
w3c: false
Rubeus:
# Rubeus uses a browser that has CSS grid support.
selenium2:
wd_host: %selenium.server%
capabilities:
firefox:
profile: %paths.base%/firefox-profiles/css-grid-enabled.zip