Skip to content

Commit

Permalink
Merge pull request #1466 from MarcelRobitaille/tests-getting-started
Browse files Browse the repository at this point in the history
Add quick start guide for backend testing
  • Loading branch information
christianlupus committed Feb 8, 2023
2 parents 064e113 + 0dc8add commit 5e22cbe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
- Fixed some issues in the API description
- Fix security issue in GitHub pages with path insertion
[#1457](https://github.com/nextcloud/cookbook/pull/1457) @christianlupus
- Add quick start guide for backend testing
[#1466](https://github.com/nextcloud/cookbook/pull/1466) @MarcelRobitaille


## 0.10.1 - 2022-11-09
Expand Down
18 changes: 18 additions & 0 deletions docs/dev/misc/automated-testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ This will provide you with a list of options the script understands.
So allow any future enhancements and bug tracking, there is some sort of documentation in place.
The [overview of the backend testing framework](backend/) should give a general idea of the involved steps.

### Quick start

These instructions will help you quickly get set up for testing using the default options.
If you would like to learn more or use non-default options, you may read [Overview over the backend testing implementation](./backend/index.md).

1. Install [Docker](https://www.docker.com/) (e.g. `sudo apt install docker`). Nextcloud will be installed in Docker for testing.
1. Install [PHP](https://www.php.net/) and some extensions: `sudo apt install php php-zip php-xml`
1. Install [Composer](https://getcomposer.org/), the PHP package manager (e.g. `sudo apt install composer`)
1. Although this app is written in PHP and JavaScript, the test helpers are written in Python. Please [install Python 3](https://www.python.org/downloads/).
1. Install PHP dependencies: `composer install`
1. Open testing directory: `cd .github/actions/run-tests/`.
1. Create a Python virtual environment: `python -m venv venv`.
1. Activate the virtual environment: `source venv/bin/activate`.
1. Install Python dependencies: `pip install -r ./requirements.txt`.
1. Pull required Docker images: `./run-locally.py --pull`.
1. Create a testing fixture: `./run-locally.py --create-fixture stable25 stable25`.
1. Run the tests: `./run-locally.py --run-default-tests`.

## Frontend testing

There is not yet any automated tests for the frontend in place.

0 comments on commit 5e22cbe

Please sign in to comment.