apache / apache/netbeans

Profiling test file is looking for a main method

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

Description

### Apache NetBeans version

Apache NetBeans 15

### What happened

Choosing `Profile Test File` from the context menu of a Java test file in a Maven project produces the an error and NetBeans looking for a `main()` method rather than running and profiling the test:

![image](https://user-images.githubusercontent.com/1555683/197857271-6dc7df49-9ed0-405d-a7ac-bb4a0f7631ac.png)
****

### How to reproduce

Just right click on a test and select to profile it.

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

No / Don't know

### Operating System

Linux

### JDK

JDK 11

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

_No response_

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

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by opening a Java test file in a Maven project and choosing Profile Test File from the context menu on Linux with JDK 11. Trace the profiling entry point that incorrectly looks for a main() method; done means the test runs and is profiled instead.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.