Details

    • Type: Sub-task Sub-task
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.5.1.RELEASE
    • Component/s: GRAILS
    • Labels:
      None
    1. _StsGrailsTest.groovy
      15 kB
      Kris De Volder (c)
    2. StsTestApp.groovy
      4 kB
      Kris De Volder (c)

      Activity

      Hide
      Kris De Volder (c) added a comment -

      Hi Graeme,

      The last few days I've been hacking away at getting something up and running that fits into the Eclipse JUnit UI. Unfortunately, the events that are being reported by GrailsBuildListener are not sufficient. The UI needs to get a copy of the test-tree before the tests start executing (so the test view can be populated).

      I have hacked-up something that modifies the TestApp and _GrailsTest scripts in Grails 1.3.4 to be able to get these events.

      The good news is... I was able to get something going that "sort of works". The bad news is that I'm not sure if it doesn't in some way break the test running scripts. I haven't got good projects with realistic test suites to try it out on. I've had to make some changes to the ordering in which things get prepared and executed (which is a bit scary with all the state mutations and implicit context dependencies in the Gant scripts).

      I'll attach the modified scripts here, maybe someone on the Grails team can have a look at them and give me some feedback.

      Kris

      PS: I also had some issues with classpath and classloaders to get the BuildListener implementation I made loaded up AND able to access the classes it needs (like Suite class from JUnit4) without classloader constraint violations.

      Show
      Kris De Volder (c) added a comment - Hi Graeme, The last few days I've been hacking away at getting something up and running that fits into the Eclipse JUnit UI. Unfortunately, the events that are being reported by GrailsBuildListener are not sufficient. The UI needs to get a copy of the test-tree before the tests start executing (so the test view can be populated). I have hacked-up something that modifies the TestApp and _GrailsTest scripts in Grails 1.3.4 to be able to get these events. The good news is... I was able to get something going that "sort of works". The bad news is that I'm not sure if it doesn't in some way break the test running scripts. I haven't got good projects with realistic test suites to try it out on. I've had to make some changes to the ordering in which things get prepared and executed (which is a bit scary with all the state mutations and implicit context dependencies in the Gant scripts). I'll attach the modified scripts here, maybe someone on the Grails team can have a look at them and give me some feedback. Kris PS: I also had some issues with classpath and classloaders to get the BuildListener implementation I made loaded up AND able to access the classes it needs (like Suite class from JUnit4) without classloader constraint violations.
      Hide
      Kris De Volder (c) added a comment - - edited

      These are the changed (and renamed) scripts.

      The main goal for these changes is to send events with references to all the JUnit 4 Suite instances before any tests get executed.

      Show
      Kris De Volder (c) added a comment - - edited These are the changed (and renamed) scripts. The main goal for these changes is to send events with references to all the JUnit 4 Suite instances before any tests get executed.
      Hide
      Kris De Volder (c) added a comment -

      Waiting for this related grails issue to be resolved to make progress on this.
      http://jira.codehaus.org/browse/GRAILS-6755

      Show
      Kris De Volder (c) added a comment - Waiting for this related grails issue to be resolved to make progress on this. http://jira.codehaus.org/browse/GRAILS-6755
      Hide
      Kris De Volder (c) added a comment -

      I'm resolving this issue. There is certainly more work that can be done to improve Grails/STS JUnit integration. However, it is now already possible to run integration tests from within STS.

      Leaving the issue open gives the impression that this isn't possible and no progress has been made on this issue.

      I'll create a new issue to track work on improving integration between STS and Grails.

      Show
      Kris De Volder (c) added a comment - I'm resolving this issue. There is certainly more work that can be done to improve Grails/STS JUnit integration. However, it is now already possible to run integration tests from within STS. Leaving the issue open gives the impression that this isn't possible and no progress has been made on this issue. I'll create a new issue to track work on improving integration between STS and Grails.
      Hide
      Kris De Volder (c) added a comment -
      Show
      Kris De Volder (c) added a comment - New issue created https://issuetracker.springsource.com/browse/STS-1555

        People

        • Assignee:
          Kris De Volder (c)
          Reporter:
          Graeme Rocher
        • Votes:
          14 Vote for this issue
          Watchers:
          9 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:
            First Response Date: