Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 1.1-RC1
    • Component/s: None
    • Labels:
      None

      Activity

      Hide
      Zhang Zhe added a comment -

      I used grails 1.1beta1 and copied the code from the testing plugin document page(http://www.grails.org/Testing+Plugin) into a new application.

      If I add the following assert in testCreateSomething()
      assertEquals 1, testService.countItems("Bangle")
      this function can pass the test. But the second function, testCountItems(), failed.
      Without the assert, both tests are OK. It seems the new assert in the first function influenced the result of the second function.

      Please refer to Line 28 of MyServiceTests.groovy. It seems this line cause the failure of testCountItems().

      http://www.nabble.com/Questions-about-the-sample-of-test-framework(1.1beta1)-or-testing-plugin(1.0.x)-td20834502.html

      Show
      Zhang Zhe added a comment - I used grails 1.1beta1 and copied the code from the testing plugin document page( http://www.grails.org/Testing+Plugin ) into a new application. If I add the following assert in testCreateSomething() assertEquals 1, testService.countItems("Bangle") this function can pass the test. But the second function, testCountItems(), failed. Without the assert, both tests are OK. It seems the new assert in the first function influenced the result of the second function. Please refer to Line 28 of MyServiceTests.groovy. It seems this line cause the failure of testCountItems(). http://www.nabble.com/Questions-about-the-sample-of-test-framework(1.1beta1)-or-testing-plugin(1.0.x)-td20834502.html
      Hide
      Peter Ledbrook added a comment -

      Tried the attached code with the latest version of Grails and all the tests passed. This may even already work with 1.1-beta3.

      Show
      Peter Ledbrook added a comment - Tried the attached code with the latest version of Grails and all the tests passed. This may even already work with 1.1-beta3.

        People

        • Assignee:
          Peter Ledbrook
          Reporter:
          Zhang Zhe
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development