From 5598a50160cb133ea1c90b2bd807539275f3aab8 Mon Sep 17 00:00:00 2001 From: alcaneo Date: Tue, 4 Aug 2015 10:18:35 +0200 Subject: [PATCH] Add step to setup config file path in c3.php Hi, I've been struggling in making remote code coverage work and I finally figured out that the config file path was wrong. I haven't seen any documentation telling to update that path (weird). Furthermore, it is kind of impossible to debug as it generates a corrupted tar file (because of the error generated by the wrong config file path probably) that ends up by having an non-related error message (like "unable to decompress gzipped phar archive"). There is another way to do it, by setting the env var HTTP_X_CODECEPTION_CODECOVERAGE_CONFIG but, even though I don't like changing manually c3.php, I still prefer that than using env var as it wouldn't be linked anymore with your project but with your environment (that can be shared with other projects) settings. And I don't know if it would be possible that codeception set this var (as it actually knows the path) to make it available to c3.php, in fact I haven't seen anything setting this var up in codeception code. Cheers, Nico --- tests/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/README.md b/tests/README.md index eb2f24b..266bcf9 100644 --- a/tests/README.md +++ b/tests/README.md @@ -90,6 +90,8 @@ from codeception site. 3. include `c3.php` file in your `index-test.php` file before application run, so it can catch needed requests. +4. edit `c3.php` to update config file path (~ line 55) with `$config_file = realpath(__DIR__ . '../tests/codeception.yml');` + Configuration options that are used by remote code coverage: - c3_url: url pointing to entry script that includes `c3.php` file, so `Codeception` will be able to produce code coverage;