Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-3719

When creating new grails project from template - unit test wont run, with Error starting Sun's native2ascii:

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Works as Designed
    • Affects Version/s: 3.5.0.M2
    • Fix Version/s: None
    • Component/s: GRAILS
    • Labels:
    • Environment:
      Windows 7, GGTS3.5M2, jdk 7.0.51

      Description

      download fresh install of 3.5m2. Create first grails project.

      create a simple domain object. Try and run the unit test it creates for you

      Loading Grails 2.3.5

      Configuring classpath
      .
      Environment set to test
      ......................................
      Running without daemon...
      ................................Error

      Error running forked test-app: Error occurred processing message bundles: Error starting Sun's native2ascii: (Use --stacktrace to see the full trace)
      Error |
      Forked Grails VM exited with error

      then to fix - goto buildConfig and edit grails.project.fork test:false and rerun -
      this time test runs ok - but fails as the default template doesnt have correct spock format.

      you can then rest the grails.project.fork back to original and still keeps working

      Whilst we are at it I suggest that you change the default unit test template to include valid when:/then: structure

      this caught me out on GGTS 3.4 as well - may as well save all those nebies to come with something that will work. The default spock template you generate wont run

      so test
      void "test something"() {

      }

      errors like this - bit silly and easyly fixed

      java.lang.Exception: No tests found matching grails test target pattern filter from org.junit.runner.Request$1@14a001b
      at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
      at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:102)
      at TestApp$_run_closure1.doCall(TestApp.groovy:32)

      Completed 1 unit test, 1 failed in 0m 0s
      .Tests FAILED

        Attachments

          Activity

            People

            Assignee:
            kdvolder Kris De Volder
            Reporter:
            will.woodman William Woodman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: