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 7951209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:29:36+00:00 2026-06-04T02:29:36+00:00

I have a php project with unit tests included. I use Netbeans for development

  • 0

I have a php project with unit tests included. I use Netbeans for development and would like to have phpunit intergration in my IDE. If I run phpunit from the commandline, it is working. If I press Alt+F6 to run tests in Netbeans no tests run, I get the message:

No tests executed (Perhaps an error occurred, verify in Output window.)

The structure (it is a Zend Framework 2 module):

Foo/
  src/
    Foo/
      Bar.php
      Baz.php
  tests/
    Foo/
      BarTest.php
    bootstrap.php
    phpunit.xml
  Module.php
  autoload_register.php

Contents of BarTest.php

namespace Foo;

use PHPUnit_Framework_TestCase as TestCase;

class BarTest extends TestCase
{
    public function testIsWorking ()
    {
        $this->assertTrue(true);
    }
}

My phpunit.xml:

<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="bootstrap.php">
    <testsuite name="Foo">
        <directory>./</directory>
    </testsuite>
</phpunit>

My bootstrap.php:

// Set error reporting pretty high
error_reporting(E_ALL | E_STRICT);

// Get base, application and tests path
define('BASE_PATH',  dirname(__DIR__));

// Load autoloader
require_once BASE_PATH . '/autoload_register.php';

In the Netbeans project properties I tried:

  1. To set the tests directory to Foo/tests (this is required I think)
  2. To set specifically the bootstrap file (not required I think)
  3. To set specifically the XML configuration file (not required I think)
  4. To set specifically to run all *Test files (not required I think)

How can I ensure Netbeans can execute my phpunit tests?

  • 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-04T02:29:37+00:00Added an answer on June 4, 2026 at 2:29 am

    Though I had set error_reporting to a high level, the PHP CLI did not have display_errors turned on. This was it, so now I got my reporting back…

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

Sidebar

Related Questions

I'm writing unit tests for a project (written in PHP, using PHPUnit) that have
We have a project (Web/PHP) where we would like users to access their files,
We have a PHP project that we would like to version control. Right now
I have a PHP project setup in Netbeans (v6.8) where all the PHP files
I have this problem getting my newly created php project on Netbeans work on
I'm working on a PHP project with solid unit-tests coverage. I've noticed, that last
Whenever I run my unit tests in PHPStorm, i have to outcomment my require_once
I currently have a NetBeans php project setup to sync from my user directory
I have picked up a quick PHP project that I need the use of
I'm trying to unit test in a personal PHP project like a good little

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.