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

Getting Started - Testing - Failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 12.6
    • 12.6
    • java - JUnit
    • Hide
      https://netbeans.apache.org/kb/docs/java/index.html :
      https://netbeans.apache.org/kb/docs/java/javase-intro.html
      Creating JUnit Tests:
      .... In the Projects window, right-click the Test Libraries node and select Properties. In the Project Properties - MyLib window, select Categories: Libraries. In the right-hand pane select the Compile Tests tab and click the ` + ` button. From the pop-up list select Add Library, from the Global Libraries folder select JUnit 4.x and click Add Libray repeat, this time selecting the Hamcrest 1.x library.

      In LibClassTest.java, delete the body of the public void testAcrostic() method and, in place of the deleted lines, type or paste in the following: ....
      Show
      https://netbeans.apache.org/kb/docs/java/index.html : https://netbeans.apache.org/kb/docs/java/javase-intro.html Creating JUnit Tests: .... In the Projects window, right-click the Test Libraries node and select Properties. In the Project Properties - MyLib window, select Categories: Libraries. In the right-hand pane select the Compile Tests tab and click the ` + ` button. From the pop-up list select Add Library, from the Global Libraries folder select JUnit 4.x and click Add Libray repeat, this time selecting the Hamcrest 1.x library. In LibClassTest.java, delete the body of the public void testAcrostic() method and, in place of the deleted lines, type or paste in the following: ....

    Description

      I am a newbie. I am trying to test my 1st app. I am learning by using:

      Java SE Learning Trail, Getting Started - Testing and Debugging the Application. 

      Following the instruction dos not work: "In LibClassTest.java, delete the body of the public void testAcrostic() method, and ..." the  "testAcrostic" is not displayed at all.

      The inserted lines result in the error message : 1. No runnable method.

      See screenshots attached.

      Attachments

        1. JUnit 4 _ Harmcrest 1.jpg
          215 kB
          Paul
        2. NB Test - public void testAcrostic.jpg
          1.06 MB
          Paul
        3. Run Test File-1_Fault.jpg
          255 kB
          Paul
        4. Run Test File-1.jpg
          98 kB
          Paul

        Activity

          People

            paule Paul
            paule Paul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified