This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262190 - Unable to start profiler on test class with main method
Summary: Unable to start profiler on test class with main method
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-23 18:45 UTC by westrick85
Modified: 2016-07-07 01:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description westrick85 2016-05-23 18:45:27 UTC
I have a Java Class Library project. I created a test driver class with main method in the test packages. It isn't a JUnit test class. It's a simple main method that exercises some of the code.

Selecting the action "Profile Test File" on the test source file with a main method results in the following error message:

profile-test-with-main:C:\MyProject\nbproject\build-impl.xml:1237: Problem: failed to create task or type antcal
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
BUILD FAILED (total time: 0 seconds)

I think there is a typo in the profile-test-withmain target in nbproject/build-impl.xml. Replacing "antcal" with "antcall" fixes the error and allows me to profile the test file.
Comment 1 Tomas Stupka 2016-07-05 16:12:03 UTC
fixed in jet-main #d852ff89747f
Comment 2 Quality Engineering 2016-07-07 01:52:09 UTC
Integrated into 'main-silver', will be available in build *201607070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d852ff89747f
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #262190 - Unable to start profiler on test class with main method