apache / apache/netbeans

Run focused test method and Debug focused test method disabled in certain circumstances

Open
#5,892 0 comments 0 reactions 0 assignees View on GitHub
Gradle kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 17

### What happened

If you have a gradle project where the "main" source directory is not present but there is only the "test" source directory then you cannot launch a test using Run focused test method and Debug focused test method because Netbeans simply disables them.

If you create the "main/java" directories with a simple readme file inside then Netbeans enables again these two options.

This is a bug to me. You can have a project with no main sources but test sources.

The example is to have a battery of end-to-end tests that simply calls rest API.

Thanks

### How to reproduce

Just remove src/main directory.

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

No / Don't know

### Operating System

Linux Kubuntu 22.04

### JDK

openjdk 17

### Apache NetBeans packaging

Apache NetBeans provided installer, Apache NetBeans binary zip

### Anything else

Already posted on Jira https://issues.apache.org/jira/browse/NETBEANS-3720

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

No

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the issue in a Gradle project containing only test sources, then compare the focused test actions with and without src/main. Check the related NETBEANS-3720 report and consider the work done when both actions remain enabled for test-only projects.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.