Skip to content
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

PHPCI not showing phpunit result #1330

Open
simonchillier opened this issue May 31, 2017 · 2 comments
Open

PHPCI not showing phpunit result #1330

simonchillier opened this issue May 31, 2017 · 2 comments

Comments

@simonchillier
Copy link

simonchillier commented May 31, 2017

Hi,

when I am running a build in my PHPCI environment, everything work fine... but just a small problem with the php_unit plugins. Is not showing the tests results

Here the build log
Cloning into '/Users/xxxx/Projects/phpci/PHPCI/build/138_f2255'...

Working copy created: /
RUNNING PLUGIN: php_unit
PLUGIN: SUCCESS

RUNNING PLUGIN: php_code_sniffer
PLUGIN: SUCCESS
BUILD SUCCESS
RUNNING PLUGIN: email
1 emails sent
0 emails failed to send
PLUGIN: SUCCESS
Removing Build.

Here my phpci.yml

build_settings:
    
   verbose: true
    clone_depth: 2
    ignore:
        - "3rdparty"
        - "certs"
        - "SQL_changes"
        - "assets"
    mysql:
        host: "xxx"
        user: "xxx"
        pass: "xxxx"

test:
   
    php_unit:
        config:
            - "phpunit.xml"
        coverage: "build/coverage"
    php_code_sniffer:
        path: "certs"
        standard: "PSR1,PSR2"
        allowed_warnings: 999
        allowed_errors: 999
        
complete:
    email:
        default_mailto_address: [email protected]

Here my phpunit.xml

<phpunit>
    <testsuites>
        <testsuite name="Test suite">
            <directory>/Users/xxx/Projects/xxx/phpunit/</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory>/Users/xxx/Projects/xxx/phpunit</directory>
        </whitelist>
    </filter>
    <logging>
       <log type="json" target="/Users/xxx/Projects/xxx/logs/logfile.json"/>
    </logging>
</phpunit>

Here my test

final class LoginTest extends TestCase
{
	
    public function testLoginEnergyCloud2()
    {
	$this->assertEquals(
            [1, 2, 33, 4, 5, 6], 
            [1, 2, 3, 4, 5, 6]
        );
		
	}
}

The test should be return a Failure result.
When I am run manually the test, with this command : phpunit --configuration /Users/xxx/Projects/xxx/phpunit.xml is working correctly and i receive a test failure result.

I did something wrong but I don't know why. Is a log file for PHPCI ? while my logging in my phpunit config file is not working properly (the file logfile.json is empty)

Thanks
Simon

@Ooypunk
Copy link
Contributor

Ooypunk commented Jun 1, 2017

Have you checked the "Information" tab?

Logfile being empty: curious. Could it be that PHPCI intercepts the output?

@simonchillier
Copy link
Author

yes I checked the information tab. I will continue my research and keep you in touch.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants