You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

composer.json 287B

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>
7 years ago
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>
7 years ago
1234567891011121314
  1. {
  2. "require-dev": {
  3. "behat/behat": "3.8.1",
  4. "behat/mink": "1.8.1",
  5. "behat/mink-extension": "2.3.1",
  6. "behat/mink-selenium2-driver": "1.4.0",
  7. "phpunit/phpunit": "9.5.19"
  8. },
  9. "autoload": {
  10. "psr-4": {
  11. "": ["features/bootstrap", "features/core"]
  12. }
  13. }
  14. }