-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unable to run functional or acceptance tests with --coverage #515
Comments
One bug fixed, one new added. Stability! He-he, will provide a patch asap. |
Ok, you mean you use Yii1 module, or you are using PhpBrowser module? |
Would be nice to have a regression test for this. |
Sure, I have few for PhpBrowser. |
So, probably, this one is about the Yii1 module |
Not sure. I don't have Yii1+code coverage, but Laravel4 + code coverage works well. They are based on one Framework class. |
Sorry for the delay in replying. class_name: TestGuy
modules:
enabled: [Yii1, Db, PhpBrowser, TestHelper]
config:
Db:
dump: tests/codeception/_data/lsp_functional.sql So, I fixed it by including c3.php and few changes. But I tested locally, not remotely. Why I should include c3? This is bug or new feature? |
I get this too when I try to debug a different issue I'm having. Aside from those described in the Debug section of the c3 README, I've made no changes to coverage:
enabled: true
remote: true
whitelist:
include:
- ../public/routes/*
- ../public/lib/* |
@elazar what issues do you have ? |
I believe this happens when |
please do check permissions for |
Is there no way to have Codeception check for this condition when encountering this error, so that a more intuitive error message is output? |
you can write one and provide as PR :) |
Was there a solution for this? I get the same issue. Trying to run Code Coverage locally but I get the following error:
|
I'm experiencing this error as well when attempting to run remote code coverage on my Laravel 4 application. According to the logs, Laravel doesn't know what to do with the route. |
I have the same error too. codeception 2.0.11.
But if I don't include the suite name and include coverage it will fail. ie. |
@bkuhl @adamwinn and @eddiejaoude, I just solved this problem myself. I'm using Laravel 4.2, and had to create a new route to point to the file like this:
And then in codeception.yml, I have this:
(change Also, a gotcha for me was that I ended up opening up the entire |
@nateritter That worked great for me using Yii2! |
Outstanding! Glad to hear it! |
@nateritter I'm still having trouble in the Laravel app where everything runs without errors but no coverage is generated. Would you mind posting more details about your overall config? I'm seeing the below error when using the config you provided.
I tried opening up the route so that it'd still map the route with the extra stuff in the URL after
I get the same error with this as well. If I access Solution $app = require __DIR__.'/../bootstrap/start.php';
$app->boot(); I did still use the route and remote configuration as defined at the beginning of this reply.
cc @jlaswell |
@nateritter I cant get this working, I setup the Laravel route, require the file, it runs but reports 0 in everything: actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
helpers: tests/_support
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
coverage:
enabled: true
remote: true
include:
- app/*
exclude:
- app/controllers/BaseController.php
- app/views/*
- app/storage/*
- app/start/*
- app/lang/*
- app/database/*
- app/config/*
modules:
config:
Db:
dsn: ''
user: ''
password: ''
dump: tests/_data/dump.sql Route::get('/c3/{extra}', function () {
require base_path('c3.php');
})->where('extra', '.*'); Obviously I have tests Report I am running the coverage tests inside a Vagrant VM with Executing |
Hi @montogeek. I'm sorry, I am not sure how to debug your particular scenario. I had trouble troubleshooting my own setup. Perhaps @bkuhl's solution above might help? Or someone else? Sorry I can't be of more help at this point. |
:( I have already tried with the |
Uhmm, I just tried it again in another VM:
PHP
Getting 0% coverage again. Can please somebody tell me what should I check or something? I am really frustrated :( Using |
Ok, I upgraded to 2.0.13, run the test again and got 0%, then remove PHPBrowser module form functional tests and finally I got a nice report :D. What is wrong with that package? Or do I need to add some extra config, this was my settings: PhpBrowser:
url: 'http://new-monitores.app' |
I have a fresh install of Codeception 2.1.0, and using a simple test page with only phpinfo() (no frameworks). When I run:
I get this error message:
My codeception.yml:
My acceptance.suite.yml:
My test.php file:
My ExampleCest.php:
I'm using wamp in Windows 7, with xdebug and xdebug_remote ON. What am I doing wrong? |
You haven't uploaded c3.php to your server. http://codeception.com/docs/11-Codecoverage#Remote-CodeCoverage |
Thank you @Naktibalda!! It works! |
Now I'm facing another problem... Local tests worked perfectly, but when I try remote I get this error:
Both codeception and acceptance ymls files are already configured with
And bootstrap.php has the include for c3.php. What can be wrong? One detail: my app uses Phalcon2. |
For debugging:
|
Reproducing the same error locally, and replacing 500 by 200 in c3.php, I get:
Even deleting that file (and all alike in Temp folder), it happens again. |
When I tried run functional test I got an error:
dmitry@dmitry:/var/www/lsp.local/httpdocs/protected$ codecept run functional AgencyCest.php --coverage
Codeception PHP Testing Framework v1.6.6
Powered by PHPUnit 3.7.24 by Sebastian Bergmann.
Suite functional started
[ErrorException]
file_get_contents(http://lsp.local/index.php/c3/report/clear): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
run [-c|--config="..."] [--report] [--html] [--xml] [--tap] [--json] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--coverage] [--no-exit] [--defer-flush] [-g|--group="..."] [-s|--skip="..."] [--skip-group="..."] [suite] [test]
In the older versions of Codeception this error was not occur. For example:
dmitry@dmitry:/var/www/lsp.local/httpdocs/protected$ codecept run functional AgencyCest.php --coverage
Codeception PHP Testing Framework v1.6.4.2
Powered by PHPUnit 3.7.22 by Sebastian Bergmann.
Suite functional started
Trying to create agency (AgencyCest.createAgency)
Scenario:
...
I used Yii1, my codeception.yml is:
The text was updated successfully, but these errors were encountered: