New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX log path override #4143

Merged
merged 2 commits into from May 9, 2017

Conversation

Projects
None yet
2 participants
@kusnir
Contributor

kusnir commented Apr 19, 2017

When you run:
php vendor\codeception\codeception\codecept run -vvv --override="paths: log: tests/_output/Acceptance_TestCest_test" --xml=report.xml tests\acceptance\TestCest:test
it generates report and error screenshots to tests/_output and not to tests/_output/Acceptance_TestCest_test

... and override by configuration also does not work - this commit fix only override by parameter. Try add to tests/acceptance.suite.yml:

env:
    development:
        paths:
            log: tests/_output/runner1

and run:
php vendor\codeception\codeception\codecept run -vvv --env=development --xml=report.xml tests\acceptance\TestCest:test
it generates report and error screenshots to tests/_output and not to tests/_output/Acceptance_TestCest_test

Stefan Kusnir added some commits Apr 19, 2017

Stefan Kusnir
FIX log path override
php vendor\codeception\codeception\codecept run -vvv --override="paths: log: tests/_output/Acceptance_TestCest_test" --xml=report.xml tests\acceptance\TestCest:test
- it genereate report and error screenshots to tests/_output
Stefan Kusnir
@DavertMik

Thanks. Any ideas how to make this work for overriding by environment?

return self::$config = self::mergeConfigs(self::$config, $config);
self::$config = self::mergeConfigs(self::$config, $config);
if (isset(self::$config['paths']['log'])) {

This comment has been minimized.

@DavertMik

DavertMik Apr 20, 2017

Member

I think this checks are not needed as this config should be available by default

@DavertMik

DavertMik Apr 20, 2017

Member

I think this checks are not needed as this config should be available by default

This comment has been minimized.

@kusnir

kusnir Apr 21, 2017

Contributor

Should, but without them some checks were not successful ... probably in some test cases are not defined all paths (see first commit checks)

@kusnir

kusnir Apr 21, 2017

Contributor

Should, but without them some checks were not successful ... probably in some test cases are not defined all paths (see first commit checks)

This comment has been minimized.

@kusnir

kusnir May 3, 2017

Contributor

I was thinking about overriding by environment and it is not good idea because the results (HTML/XML reports) will be divided to separate folders by suites and I do not think it is desirable state. I think, user wants to set log path for run and not for suite. And for run can by path set by codeception.yml or --override parameter.

@kusnir

kusnir May 3, 2017

Contributor

I was thinking about overriding by environment and it is not good idea because the results (HTML/XML reports) will be divided to separate folders by suites and I do not think it is desirable state. I think, user wants to set log path for run and not for suite. And for run can by path set by codeception.yml or --override parameter.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik May 9, 2017

Member

Ok, thanks!

Member

DavertMik commented May 9, 2017

Ok, thanks!

@DavertMik DavertMik merged commit bee5445 into Codeception:2.2 May 9, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
wercker/build Wercker pipeline passed
Details

chris1312 added a commit to chris1312/Codeception that referenced this pull request Jun 16, 2017

FIX log path override (#4143)
* FIX log path override
php vendor\codeception\codeception\codecept run -vvv --override="paths: log: tests/_output/Acceptance_TestCest_test" --xml=report.xml tests\acceptance\TestCest:test
- it genereate report and error screenshots to tests/_output

* FIX undefined configurations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment