2020-05-14 20:30:44 +02:00
# Umbraco Acceptance Tests
2020-08-24 12:39:30 +01:00
### Prerequisites
2020-05-14 20:30:44 +02:00
- NodeJS 12+
- A running installed Umbraco on url: [https://localhost:44331 ](https://localhost:44331 ) (Default development port)
- Install using a `SqlServer` /`LocalDb` as the tests execute too fast for `SqlCE` to handle.
- User information in `cypress.env.json` (See [Getting started ](#getting-started ))
### Getting started
2020-08-24 12:39:30 +01:00
The tests are located in the project/folder as `Umbraco.Tests.AcceptanceTests` . Make sure you run `npm install` in that folder, or let your IDE do that.
2020-05-15 07:35:23 +02:00
2020-08-24 12:39:30 +01:00
Next, it is important that you create a new file in the root of the project called `cypress.env.json` .
This file is already added to `.gitignore` and can contain values that are different for each developer machine.
2020-05-14 20:30:44 +02:00
2020-08-24 12:39:30 +01:00
The file needs the following content:
2020-05-14 20:30:44 +02:00
```
{
"username": "<email for superadmin>",
"password": "<password for superadmin>"
}
```
Replace the `<email for superadmin>` and `<password for superadmin>` placeholders with correct info.
2020-05-15 07:35:23 +02:00
2020-05-14 20:30:44 +02:00
### Executing tests
2020-08-24 12:39:30 +01:00
There are two npm scripts that can be used to execute the test:
2020-05-14 20:30:44 +02:00
1. `npm run test`
- Executes the tests headless.
1. `npm run ui`
- Executes the tests in a browser handled by a cypress application.
In case of errors it is recommended to use the UI to debug.