Codeception / Codeception/Codeception

Move config file to another directory from tests

Open
#5,789 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
4.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

#### What are you trying to achieve?
Move codeception.yml to another directory, define paths to tests and make it work

#### What do you get instead?
Codeception output error

```bash
[Symfony\Component\Finder\Exception\DirectoryNotFoundException]
The "D:\www\project\backend\local\api\web\..\..\..\api\tests\../../../api\" directory does not exist.
```

### Details
* Configuration:
```yml
# suite config
suites:
api:
actor: ApiTester
path: ../../backend/api
modules:
enabled:
- REST:
url: http://localhost/api
depends: PhpBrowser

paths:
tests: ../../backend/api/tests
output: ../../backend/api/tests/_output
data: ../../backend/api/tests/_data
support: ../../backend/api/tests/_support

settings:
shuffle: false
lint: true

```

It works, if i put config file 1 folder deeper. Configuration:
```yml
# suite config
suites:
api:
actor: ApiTester
path: ../../../backend/api
modules:
enabled:
- REST:
url: http://localhost/api
depends: PhpBrowser

paths:
tests: ../../../backend/api/tests
output: ../../../backend/api/tests/_output
data: ../../../backend/api/tests/_data
support: ../../../backend/api/tests/_support

settings:
shuffle: false
lint: true
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.