From b5fba5649957b4beca807d1fb18a6cfa32ffd6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Tue, 4 Apr 2017 16:11:20 +0200 Subject: [PATCH] Add basic files for the automated acceptance test system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The acceptance tests verify that a Nextcloud server works as expected from the point of view of an end-user. They are specified as user stories using Behat paired with Mink, which provides web browser automation. Mink supports several browser emulators, but the system is set up to use Selenium, as it is FOSS and the one that better reflects the use of a web browser by an end-user (as, in fact, it controls real web browsers). Signed-off-by: Daniel Calviño Sánchez --- build/acceptance/composer.json | 9 ++++++ build/acceptance/config/behat.yml | 14 ++++++++++ .../features/bootstrap/FeatureContext.php | 28 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 build/acceptance/composer.json create mode 100644 build/acceptance/config/behat.yml create mode 100644 build/acceptance/features/bootstrap/FeatureContext.php diff --git a/build/acceptance/composer.json b/build/acceptance/composer.json new file mode 100644 index 00000000000..a361adaa40d --- /dev/null +++ b/build/acceptance/composer.json @@ -0,0 +1,9 @@ +{ + "require-dev": { + "behat/behat": "^3.0", + "behat/mink": "^1.5", + "behat/mink-extension": "*", + "behat/mink-selenium2-driver": "*", + "phpunit/phpunit": "~4.6" + } +} diff --git a/build/acceptance/config/behat.yml b/build/acceptance/config/behat.yml new file mode 100644 index 00000000000..01feef51608 --- /dev/null +++ b/build/acceptance/config/behat.yml @@ -0,0 +1,14 @@ +default: + autoload: + '': %paths.base%/../features/bootstrap + suites: + default: + paths: + - %paths.base%/../features + contexts: + - FeatureContext + extensions: + Behat\MinkExtension: + sessions: + default: + selenium2: ~ diff --git a/build/acceptance/features/bootstrap/FeatureContext.php b/build/acceptance/features/bootstrap/FeatureContext.php new file mode 100644 index 00000000000..b309a7e04b0 --- /dev/null +++ b/build/acceptance/features/bootstrap/FeatureContext.php @@ -0,0 +1,28 @@ +. + * + */ + +use Behat\Behat\Context\Context; + +class FeatureContext implements Context { + +}