Hi,

Here is the section of build.xml that configures the way phpunit is
run by jenkins:

-------------------
 <target name="phpunit"
         description="Run unit tests using PHPUnit and generates
junit.xml and clover.xml">
    <exec executable="phpunit" failonerror="false">
        <arg value="--configuration" />
        <arg value="phpunit.xml.dist"/>
    </exec>
 </target>
------------------

It works perfectly, I can see the failures if any and everything.One
day, we had a problem with phpunit that was blocking at some level,
and I wondered if I can catch that at jenkins level.

As you see in the description of the configuration, phpunit generates
the files junit.xml and clover.xml.

When phpunit crashes I could make a test if one of those files was
correctly generated, but I do not know where to insert that test.


Thank you

On Wed, Feb 6, 2013 at 4:12 PM, Sami Tikka <[email protected]> wrote:
> We need more details to help you.
>
> What type of job have you created?
>
> How exactly are you executing phpunit? What is the build step you use? Shell, 
> CMD, something else?
>
> Can you show us the exact command or configuration?
>
> More information is better than less.
>
> -- Sami
>
> Adam Tong <[email protected]> kirjoitti 5.2.2013 kello 21.13:
>
>> Hi,
>>
>> Where should I do this check exactly?
>>
>> Is there a way to do that in build.xml?
>>
>> Thank you
>>
>> On Tue, Feb 5, 2013 at 12:03 PM, Mark Waite <[email protected]> wrote:
>>> If your call to phpunit is expected to create a file, you could check that
>>> file is created and then use "exit 1" to cause the build script to exit with
>>> the failure.
>>>
>>> Mark Waite
>>>
>>>
>>> ________________________________
>>> From: Adam Tong <[email protected]>
>>> To: [email protected]
>>> Sent: Tuesday, February 5, 2013 9:17 AM
>>> Subject: Detect command failure?
>>>
>>> Hi,
>>>
>>> I am running jenkins on Linux.
>>>
>>> Yesterday, because of a memory issue, phpunit was not able to run the
>>> hole tests suite. However the build was still successful.
>>>
>>> I understand that if phpunit fails it does not return any errors or
>>> failures.
>>>
>>> Now I am wondering if there is a way to make Jenkins detect this kind of
>>> issues.
>>>
>>> Thank you
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to