Announcement Announcement Module
Collapse
No announcement yet.
Pizza Tutorial not as expected - no test code showing Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pizza Tutorial not as expected - no test code showing

    I have been (reatedly) working through the pizza tutoiral. Section 2.7 in http://www.springsource.org/roo/guide?w=beginning shows that the file BaseIntegrationTest.java should have code in it. When I get to that point I see no code in it. My copy of the function testMarkerMethod() is empty.

    perform tests - also produces the "wrong output" see below. Can anyone offer an idea as to where I am comming of the rails?

    I get similar problems with the scipt tutorials like wedding so I don't see it as being down to my bad typing. Thanks if you can help.

    Code:
     [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building pizza
    [INFO]    task-segment: [test]
    [INFO] ------------------------------------------------------------------------
    [INFO] [aspectj:compile {execution: default}]
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
    [debug] execute contextualize
    [INFO] [resources:resources {execution: default-resources}]
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 4 resources
    [INFO] [compiler:compile {execution: default-compile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [aspectj:test-compile {execution: default}]
    [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
    [debug] execute contextualize
    [INFO] [resources:testResources {execution: default-testResources}]
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 0 resource
    [INFO] [compiler:testCompile {execution: default-testCompile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [surefire:test {execution: default-test}]
    [INFO] Surefire report directory: C:\c\bcSTS\271_play_wksp\pizza\target\surefire-reports
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 6 seconds
    [INFO] Finished at: Wed Jul 13 02:12:33 BST 2011
    [INFO] Final Memory: 24M/58M
    [INFO] ------------------------------------------------------------------------
    roo> perform tests
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building pizza
    [INFO]    task-segment: [test]
    [INFO] ------------------------------------------------------------------------
    [INFO] [aspectj:compile {execution: default}]
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
    [debug] execute contextualize
    [INFO] [resources:resources {execution: default-resources}]
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 4 resources
    [INFO] [compiler:compile {execution: default-compile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [aspectj:test-compile {execution: default}]
    [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
    [debug] execute contextualize
    [INFO] [resources:testResources {execution: default-testResources}]
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 0 resource
    [INFO] [compiler:testCompile {execution: default-testCompile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [surefire:test {execution: default-test}]
    [INFO] Surefire report directory: C:\c\bcSTS\271_play_wksp\pizza\target\surefire-reports
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 6 seconds
    [INFO] Finished at: Wed Jul 13 02:31:03 BST 2011
    [INFO] Final Memory: 24M/58M
    [INFO] ------------------------------------------------------------------------
    roo>
    --
    Roger
    Last edited by RogerPf; Jul 12th, 2011, 09:01 PM.

  • #2
    Hi Roger,

    The "testMarkerMethod" method is meant to be empty. It's only there so that JUnit recognises the class as a test suite (the "real" test methods being injected by AspectJ).

    What you're seeing in Section 2.7 of the ref guide (the diagram after "To see code completion working ...") is a demonstration of code completion working, despite some of the code being in aspects. The code shown in the "testMarkerMethod" method in the diagram has been typed in manually; you should not expect to see it in your own projects. Sorry if the documentation is misleading.

    As for the "wrong output" that you mentioned when running the test, it looks OK to me (it does say "BUILD SUCCESSFUL" after all). What output were you expecting to see?

    Comment


    • #3
      Thank Andrew you that is helpful. I suppose I was expecting to see the messages about the '9 tests completed' that the tutorial text shows.

      I guess that one of the signs of the the success of the the 'spring - roo rapid developement' is that it is going to suck in more and more people like me, who come from different technolgies/worlds and don't yet have the "standard assumptions".

      Comment


      • #4
        Yes, the tutorial is already out of date. I would like it if a selenium (other test) script ran through each step of the tutorial once a day, using the latest libraries, and sent emails to the maintainer(s) when it stopped working as expected. I think all programs should do that that are open source. It would be great to keep tutorials (the new documentation) up to date. (rant off). BTW, the tutorial USED to give the '9 steps completed' about 2 months ago. Now, it passes, but does not say anything.

        Comment

        Working...
        X