apache / apache/netbeans

Impossible to debug unit test based on TestNG when the package is named a certain way

Open
#7,719 2 comments 0 reactions 0 assignees View on GitHub
Ant debugger Java kind:bug tests
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 22

### What happened

When a TestNG unit test is named
com.basic.xml, com.basic.xmltoto but not com.basic.totoxml the test cannot be run in debug mode.
It doesn't find the class.
It's because the package suffix starts with xml.

### Language / Project Type / NetBeans Component

Java application project with Ant

### How to reproduce

Create a package com.basic.xmltoto
Create a class in it, add a test method (annotated with @Test) and run this method in debug mode

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows 11

### JDK

Java 21

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

The problem occurs systematically

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in a Java application project with Ant using Apache NetBeans 22: create package com.basic.xmltoto, add a class with a TestNG @Test method, and run it in debug mode. Trace the TestNG debug launch from the project or test-run entry point and verify that debugging finds the class for packages whose suffix starts with xml.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.