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

Running or debugging of individual JUnit tests sometimes does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 9.0
    • None
    • None

    Description

      Old Bugzilla reference: https://netbeans.org/bugzilla/show_bug.cgi?id=252959

      Text issue copied and pasted as is from above link

      Project reproducing inability to run individual JUnit tests.
      
      Product Version: NetBeans IDE Dev (Build 201506110001)
      Java: 1.7.0_76; Java HotSpot(TM) 64-Bit Server VM 24.76-b04
      Runtime: Java(TM) SE Runtime Environment 1.7.0_76-b13
      System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)
      User directory: /home/cesilko/.netbeans/dev
      Cache directory: /home/cesilko/.cache/netbeans/dev
      
      Description:
      ============
      Under some circumstances users can neither run nor debug individual JUnit tests due to an invalid format of arguments. Maybe it's a consequence of JUnit library upgrade to version 1.12. See this error output:
      
      /home/cesilko/.cache/netbeans/dev/executor-snippets/junit.xml:140: The following error occurred while executing this line:
      /home/cesilko/.cache/netbeans/dev/executor-snippets/junit.xml:78: Invalid specification of test methods: "teststorun.CalculatorTest.testAdd"; expected: comma-separated list of valid Java identifiers
      BUILD FAILED (total time: 0 seconds)
      
      Steps to reproduce:
      ===================
      1. Launch NetBeans IDE and open attached CannotRunIndividualTest project.
      2. Right click "Source Packages > teststorun" node and invoke "Tools > Create/Update Tests" from popup menu.
      3. In "Create Tests" dialog just push "OK" button.
      4. Right click "CannotRunIndividualTest" project and invoke "Test" from its popup menu.
      5. In "Test Results" output window right click "No test passed... > teststorun.CalculatorTest Failed > teststorun.CalculatorTest.testAdd Failed: ..." node and invoke "Run Again" from its popup menu.
      
      Expected: The testAdd test is run and you see that it failed again in the Test Results output window and no other test results.
      Actual: The testAdd test is not run due to the aforementioned error.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            manikantannaren Manikantan Narender Nath
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: