Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2771

Gradle Project Properties: Customization for test.single and run.single.method seems broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 11.1
    • None
    • projects - Gradle
    • None
    • Netbeans 11.1 beta 2
      Gradle 4.2.1
      JUnit 5.4
      Oracle JDK 8
      Windows 10

    Description

      Our large multi-project has long build times, and thus doesn't want to use "-rerun-tasks" when running tests.  It adds too much runtime, which is especially noticable while iterating on development of a fast-running test class/method.  To solve this, we simply need to customize all of the build actions for running tests.  We simply need to replace "-rerun-tasks" with "cleanTest".  Making that customization would be totally OK with us... except that the customization of the "run.single.method" build action seems broken in Netbeans 11.1 beta 2.

      When I customize the "run.single.method" action using the project properties dialog (to remove "--rerun-tasks"), the customization seems to work while the dialog is still open.  After dismissing the dialog with the "OK" button, the gradle.properties file contains:

       

      action.run.single.method.args=cleanTest test --tests ${selectedMethod}

       

      But when I actually execute a test method, this change does not appear to apply.  The compile steps are all still rerun, the same as before.

      Also, if I re-open the project properties, the dialog doesn't show any customization for the "run.single.method" action anymore.

      It seems as if the file writing code for customizing this action is working, but the in-memory storage and/or file parsing code for the customized action is broken.

       

       

      The same problem seems to be happening as with "test.single".  The gradle.properties file gets written with:

      action.test.single.args=cleanTest test --tests ${selectedClass} 

      But this has no effect,and re-opening the dialog causes this setting to disappear.

       

      As an aside...

      Shouldn't the "run.single.method" action be named "test.single.method" instead of "run.single.method", to be consistent with the naming of other build actions?  I found the "run" instead of "test" in the name to be confusing at first.  And I'm almost wondering if that's related to the root cause of this bug (I didn't have time to review the source code myself to check).

      Attachments

        Issue Links

          Activity

            People

              lkishalmi Laszlo Kishalmi
              Furrer Travis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: