NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

CodeCoverage not working

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
t.jancik@gmail.com



Joined: 05 Apr 2012
Posts: 3

PostPosted: Thu Apr 05, 2012 10:05 am    Post subject: CodeCoverage not working Reply with quote

Hello

I'm running Netbeans 7.1.1 on Windows7
PHPUnit 3.6.1.0
xdebug install with version it recommended me according to my php info

I'm able to run all tests for project or run a single test file.
At the end of the test output there is message
Quote:
Writing code coverage data to XML file, this may take a moment.

but I still see the coverage at 0%

Also when I'm on any source file and press CTRL + F6 to run test on it, it's giving me error
Quote:
Test file for the selected source file was not found

(this is probably because of the namespaces used in tests. when I remove namespace it works, but test failes, because they cannot find the classes)


I google for 2 days already to find any help, but nothing is working... any suggestion?
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Thu Apr 05, 2012 11:10 am    Post subject: CodeCoverage not working Reply with quote

Hi,

Dne 5.4.2012 12:05, address-removed napsal(a):
Quote:
xdebug install with version it recommended me according to my php info

does debugging work for you?

Quote:
Quote:
Writing code coverage data to XML file, this may take a moment.

If you can, please submit an issue [1] (against php/PHPUnit) with
reliable steps to reproduce. Or better, attach a sample project we can
play with.

Quote:
Also when I'm on any source file and press CTRL + F6 to run test on it, it's giving me error
Quote:
Test file for the selected source file was not found
(this is probably because of the namespaces used in tests. when I remove namespace it works, but test failes, because they cannot find the classes)

The source file and the test file should be in the same namespace
otherwise they cannot be paired (the relation is: <[namespace]ClassName>
<[namespace]ClassName>Test).

Tomas
[1] http://netbeans.org/community/issues.html
Back to top
t.jancik@gmail.com



Joined: 05 Apr 2012
Posts: 3

PostPosted: Fri Apr 06, 2012 2:27 pm    Post subject: Reply with quote

so the problem was that I had my projects on D: and Netbeans are installed on C:


I found people complaing about this since version 6.8, maybe this could be fixed... I dont wanna have data on C: as well as apps on D:
Back to top
Geoff Hoffman
Posted via mailing list.





PostPosted: Fri Apr 06, 2012 2:32 pm    Post subject: CodeCoverage not working Reply with quote

On Fri, Apr 6, 2012 at 7:27 AM, address-removed ([email]address-removed[/email]) <address-removed ([email]address-removed[/email])> wrote:
Quote:
so the problem was that I had my projects on D: and Netbeans are installed on C:


I found people complaing about this since version 6.8, maybe this could be fixed... I dont wanna have data on C: as well as apps on D:



This may not help but IIRC phpunit runs test via PHP CLI. Does the Windows installation of PHP have a separate php.ini for the CLI vs. the Module for Apache? Did you try adding your project file path(s) document root to PHP's include_path (in php.ini)?


This email, including any attachments, is for the sole use of the intended recipient and may contain confidential information. If you are not the intended recipient, please immediately notify us by reply email or by telephone, delete this email and destroy any copies. Thank you.
Back to top
t.jancik@gmail.com



Joined: 05 Apr 2012
Posts: 3

PostPosted: Fri Apr 06, 2012 2:41 pm    Post subject: Re: CodeCoverage not working Reply with quote

Geoff Hoffman wrote:

This may not help but IIRC phpunit runs test via PHP CLI. Does the Windows installation of PHP have a separate php.ini for the CLI vs. the Module for Apache? Did you try adding your project file path(s) document root to PHP's include_path (in php.ini)?


I don't run any server on local. I only have PHP, PHPUnit and xdebug installed to be able to run unit tests. projects itself I run on dev server

I tried added the path to include path, but no help. I think this is not the problem as far as the tests run. the problem is with saving the code coverage report
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Tue Apr 10, 2012 6:53 am    Post subject: CodeCoverage not working Reply with quote

Hi,

Dne 6.4.2012 16:27, address-removed napsal(a):
Quote:
so the problem was that I had my projects on D: and Netbeans are installed on C:

yes, this is a known bug of PhpUnit; unfortunately this cannot be work
arounded on NetBeans' side.

Tomas
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo