summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-04 16:11:20 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-19 08:26:03 +0200
commitb5fba5649957b4beca807d1fb18a6cfa32ffd6bc (patch)
tree40a75bf6f7f09110e79542040ffcf36dd24b663f
parentf1ddb939a0f263582acbadf4e2dd6277638f2ce3 (diff)
downloadnextcloud-server-b5fba5649957b4beca807d1fb18a6cfa32ffd6bc.tar.gz
nextcloud-server-b5fba5649957b4beca807d1fb18a6cfa32ffd6bc.zip
Add basic files for the automated acceptance test system
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 <danxuliu@gmail.com>
-rw-r--r--build/acceptance/composer.json9
-rw-r--r--build/acceptance/config/behat.yml14
-rw-r--r--build/acceptance/features/bootstrap/FeatureContext.php28
3 files changed, 51 insertions, 0 deletions
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 @@
+<?php
+
+/**
+ *
+ * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+use Behat\Behat\Context\Context;
+
+class FeatureContext implements Context {
+
+}