Spring Roo
  1. Spring Roo
  2. ROO-314

Use Spring Framework-provided static mock integration test services

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RC1, 1.0.0.RC2
    • Fix Version/s: 1.0.0.RC3
    • Component/s: TESTING
    • Labels:
      None

      Description

      A new feature request is in Spring Framework to move the static mock test features to Spring Framework itself, specifically to the Spring Aspects JAR. This would eliminate the need for Roo to create template files in user projects and as such will offer a more convenient way to add new capabilities to this feature and fix any issues that may be encountered.

      This issue relates to modifying the "test mock" command to use the new Spring Framework types instead of creating files in the user project.

        Issue Links

          Activity

          Hide
          Ben Alex added a comment -

          Checked into SVN revision 372.

          Those working from SVN prior to the release of Roo 1.0.0.RC3 will need to take into account the ongoing consideration of the JUnit dependency scope as per the discussion in SPR-6274. Also they will need to take into account that ROO-322 (Spring Framework 3.0.0.RC2 upgrade) has yet to be completed. Therefore, to test this change you should:

          1. Create a new directory and change into it
          2. roo-dev
            roo> script vote.roo
            roo> test integration --entity ~.domain.Vote
            roo> quit
          3. Edit pom.xml and change the spring.version at the bottom to 3.0.0.BUILD-SNAPSHOT
          4. Edit pom.xml and change the com.springsource.org.junit dependency to scope "compile" (currently scope "test")
          5. mvn test

          These special considerations should be removed by the time Roo 1.0.0.RC3 is out (as Spring Framework 3.0.0.RC2 will be out and the final SPR-6274 interop will have been finalised).

          Show
          Ben Alex added a comment - Checked into SVN revision 372. Those working from SVN prior to the release of Roo 1.0.0.RC3 will need to take into account the ongoing consideration of the JUnit dependency scope as per the discussion in SPR-6274 . Also they will need to take into account that ROO-322 (Spring Framework 3.0.0.RC2 upgrade) has yet to be completed. Therefore, to test this change you should: Create a new directory and change into it roo-dev roo> script vote.roo roo> test integration --entity ~.domain.Vote roo> quit Edit pom.xml and change the spring.version at the bottom to 3.0.0.BUILD-SNAPSHOT Edit pom.xml and change the com.springsource.org.junit dependency to scope "compile" (currently scope "test") mvn test These special considerations should be removed by the time Roo 1.0.0.RC3 is out (as Spring Framework 3.0.0.RC2 will be out and the final SPR-6274 interop will have been finalised).
          Hide
          Ben Alex added a comment -

          Requires slight changes now SPR-6274 is resolved:

          1. Removed @Test from the pointcut. Besides the points you raised, this change also makes this feature work with non-JUnit testing frameworks (TestNG).
          2. Renamed JUnitStaticEntityMockingControl to AnnotationDrivenStaticEntityMockingControl. This means we will need to change org.springframework.roo.addon.test.IntegrationTestOperations to replace the classname appended.
          3. Updated junit dependency to 'test' scope.

          Show
          Ben Alex added a comment - Requires slight changes now SPR-6274 is resolved: 1. Removed @Test from the pointcut. Besides the points you raised, this change also makes this feature work with non-JUnit testing frameworks (TestNG). 2. Renamed JUnitStaticEntityMockingControl to AnnotationDrivenStaticEntityMockingControl. This means we will need to change org.springframework.roo.addon.test.IntegrationTestOperations to replace the classname appended. 3. Updated junit dependency to 'test' scope.
          Hide
          Ben Alex added a comment -

          Checked in final adjustment as SVN revision 382.

          Show
          Ben Alex added a comment - Checked in final adjustment as SVN revision 382.
          Hide
          Razan Abbass added a comment -
          Show
          Razan Abbass added a comment - cheap flights Pregnancy Period

            People

            • Assignee:
              Ben Alex
              Reporter:
              Ben Alex
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: