9 Replies Latest reply on Jan 28, 2006 3:39 AM by maxandersen

    added hibernate tools unit tests to the build

    maxandersen


      so now i have committed some hibernate tools tests to the build.

      I could not test it since the auto build does not work on my machine, but i followed all the instructions to the point.

      So if the build machine go belly up you know that something was typed wrong ,)

      p.s. these tests uses the display so i hope that is supported.

        • 1. Re: added hibernate tools unit tests to the build

          hehe this should be fun =). i will test it on my build machine at home later tonight...

          • 2. Re: added hibernate tools unit tests to the build
            maxandersen

            another p.s. is that i did not put them in the /tests directory since that feels really wrong to decouple my hibernate tools only tests from the plugin structure. Let me know if that is an issue for you.

            I would recommend we followed the eclipse "standard" way of adding a tests directory under the plugins "home", e.g.

            ejb3/features
            ejb3/plugins
            ejb3/tests

            i think that is how e.g. WTP does it see

            http://dev.eclipse.org/viewcvs/index.cgi/wst/components/sse/?cvsroot=WebTools_Project

            http://dev.eclipse.org/viewcvs/index.cgi/wst/components/web/?cvsroot=WebTools_Project

            • 3. Re: added hibernate tools unit tests to the build
              maxandersen

              these tests are just initial ones, not really testing much except that the testing code and build systems works ;)

              • 4. Re: added hibernate tools unit tests to the build

                +1
                That should probably be fine. The current tests we have are more "generic" for the entire IDE anyway, so I wasn't sure where to put them. Plugin-specific tests should (as you said) probably just reside locally..

                One minor problem of course though is that now our unit tests will depend on sourceforge.... when are you moving everything over again? =)

                • 5. Re: added hibernate tools unit tests to the build
                  maxandersen

                  soon...i for sure ain't making such a big move in the middle of a contest ;)

                  • 6. Re: added hibernate tools unit tests to the build
                    koen.aers

                     

                    "max.andersen@jboss.com" wrote:
                    soon...i for sure ain't making such a big move in the middle of a contest ;)

                    Booh, I did that :-P
                    Then I still have to find out how to commit my (one and only) test to the testsuite... I have only written one test, but it actually tests something : it creates a jBPM project using the new wizard ;-)

                    • 7. Re: added hibernate tools unit tests to the build
                      maxandersen

                      well, it actually *does* test stuff, but it is only 2 out of the 8 tests so i just said that they were not real test to not discourage you ;)

                      • 8. Re: added hibernate tools unit tests to the build

                        Ok Max...

                        I finally got a chance to sit down and play with your UI test. It looks like from the get go we had a few problems... when you added your test you forgot to put the line delimiter in so that the property was read correctly... i.e... you committed:

                        test.plugins=\
                        org.jboss.ide.eclipse.core.test:org.jboss.ide.eclipse.core.test.AllTests,
                        org.hibernate.eclipse.console.test:org.hibernate.eclipse.console.test.ConsolePluginAllTests
                        


                        but it should've been

                        test.plugins=\
                        org.jboss.ide.eclipse.core.test:org.jboss.ide.eclipse.core.test.AllTests,\
                        org.hibernate.eclipse.console.test:org.hibernate.eclipse.console.test.ConsolePluginAllTests
                        


                        After that trivial fix, it looks like the testBuild script was only able to handle "core" tests and not "ui" (workbench) tests. it was a basic fix of switching "org.eclipse.test.coretestapplication" to "org.eclipse.test.uitestapplication", but i needed a way to differentiate each test type, so each test entry now has a new part : the test-type, i.e.. the tests/build.properties.template file now looks like:
                        test.plugins=\
                        core:org.jboss.ide.eclipse.core.test:org.jboss.ide.eclipse.core.test.AllTests, \
                        ui:org.hibernate.eclipse.console.test:org.hibernate.eclipse.console.test.ConsolePluginAllTests
                        


                        "core" signifiying a junit plugin test that doesn't invoke any ui code,
                        "ui" signifiying a junit plugin test that does.

                        after getting all of that in place, it seems like for some reason running the eclipse test framework "ui-test" ant target was causing some _really_ strange classpath problems when trying to run the uitestapplication. so i basically just stopped using their core/ui-test targets and called eclipse manually, and everything works magically now.

                        i'm going to run a nightly build from here with the new tests so you get a feel for what the results look like with your tests integrated.

                        • 9. Re: added hibernate tools unit tests to the build
                          maxandersen

                          argh ...the horror of multiline properties! thanks for catching it.

                          looking forward to see it run on the nightly build ;)