I created a project by following jenkins-php.org. Everything works fine but I'm unable to skip PHPunit test. What could be the simple way to skip PHPUnitTest to avoid errors... Initially I thought it was easy and I removed all instances from code but still I'm able to see this error, also I'm unable to generate phpdoc if the project don't have test files... pls help
Asked
Active
Viewed 53 times
2 Answers
0
One possibility would be to remove the target, which executes PHPUnit from the list of dependant targets when executing ANT. So if ANT is executing the target full-build
for instance, change
<target name="full-build"
depends="prepare,static-analysis,phpunit,phpdox,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation"/>
to
<target name="full-build"
depends="prepare,static-analysis,phpdox,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation"/>
Note the missing phpunit
of the depends
attribute value.
Another possibility would be to write one dummy test which does nothing but $this->assertTrue(true);
.

Havelock
- 6,913
- 4
- 34
- 42
-
I did the first step already, need to check with the second one. – Anil Kumar Sep 03 '15 at 06:03
-
Then you should maybe check which target exactly you have specified in the Jenkins configuration. – Havelock Sep 03 '15 at 06:07
-
I'm really new to jenkins Havelock... so could you pls precise me what exactly did u mean when you say the word "target" in your last comment.... thank you – Anil Kumar Sep 03 '15 at 06:17
-
Something like [this](http://i.imgur.com/fdwOiTQ.png?1). You can ignore the `Ant Version` field. – Havelock Sep 03 '15 at 08:56
0
Set below to false in phpunit.xml to avoid fatal errors and delete Publish xUnit test result report this entire block jenkins GUI project configuration to avoid build finished status failure…. remember build will be successful though ..... Also Thank you for your help Havelock.

Anil Kumar
- 31
- 5