Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:18:31+00:00 2026-06-17T13:18:31+00:00

I am experimenting with using Jenkins with CakePHP as part of my push towards

  • 0

I am experimenting with using Jenkins with CakePHP as part of my push towards better CI.

I am using the following command for a build job step.

/var/lib/jenkins/workspace/ABC-MASTER/src/abc/Console/cake testsuite -app 
/var/lib/jenkins/workspace/ABC-MASTER/src/abc app AllTests --log-junit 
/var/lib/jenkins/workspace/ABC-MASTER/build/logs/junit.xml --coverage-clover 
/var/lib/jenkins/workspace/ABC-MASTER/build/logs/clover.xml --coverage-html 
/var/lib/jenkins/workspace/ABC-MASTER/build/coverage

This generates coverage reports even for lib folder.

My questions are:

  1. Should I generate the coverage html pages for lib folder as well?
  2. If not, how do I turn it off?

My code is structured as:

build
src
   abc (this is the app folder)
   lib ( this is the Cake lib folder)
tests
   Test (this follows the Cake convention)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:18:32+00:00Added an answer on June 17, 2026 at 1:18 pm

    The solution has 3 parts:

    1) create a phpunit.xml.dist inside the project root.

    build
    src
    abc (this is the app folder)
    lib ( this is the Cake lib folder)
    tests
    Test (this follows the Cake convention)
    build.xml
    phpunit.xml.dist

    2) create the following content inside the phpunit.xml.dist

    <?xml version="1.0" encoding="UTF-8"?>
    
    <phpunit>
    
      <filter>
        <blacklist>
          <directory suffix=".php">src/lib</directory>
        </blacklist> 
      </filter>
    
    </phpunit>
    

    3) add in --configuration /path/to/phpunit.xml.dist to the command.

    In the example given in the question, this becomes:

    /var/lib/jenkins/workspace/ABC-MASTER/src/abc/Console/cake test \
    --app /var/lib/jenkins/workspace/ABC-MASTER/src/abc app AllTests \
    --log-junit /var/lib/jenkins/workspace/ABC-MASTER/build/logs/junit.xml \
    --coverage-clover /var/lib/jenkins/workspace/ABC-MASTER/build/logs/clover.xml \
    --coverage-html /var/lib/jenkins/workspace/ABC-MASTER/build/coverage \
    --configuration /var/lib/jenkins/workspace/ABC-MASTER/phpunit.xml.dist
    

    For more information on how to use phpunit configuration file, look at this link. It will help to understand how to use the phpunit configuration file in particular the blacklist and whitelist section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've started experimenting with Hudson as a build server. I'm using subversion and have
Is there a shell for Javascript coding/experimenting using command line offering history, completion, help,
We use SVN for our source-code revision control and are experimenting using it for
I've been experimenting with using MS Excel 2007 to edit tabular data stored in
I'm experimenting with using html5 and css counters to number the figures in a
I've been experimenting with using Javascript object literal notation vs functions with prototypes and
I'm experimenting with using jQuery toggle to move between two functions. The results so
Experimenting with android game development. I'm using PNG format for images, and was wondering
I've recently been experimenting with extending collection objects instead of using composition for my
I am using Ruby on Rails 3.2.2 and I am experimenting the Squeel gem.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.