8 Replies Latest reply on Sep 5, 2008 10:36 AM by prabhat.jha

    automating jboss portal admin ui testing usign selenium

    prabhat.jha

      Leonid,

      Here are things you should do first:

      1. Get familiar with JBoss Portal Product. You can read http://docs.jboss.com/jbportal/v2.6.4/quickstartuser/html_single/. Your goal will be to get familiar with Portal's administration UI.
      2. Get familiar with Selenium.
      3. Look at the test case http://anonsvn.jboss.org/repos/portal/modules/test/trunk/remote/src/test/java/org/jboss/unit/test/remote/webpage/ClickLinkCommandTestCase.java
      The test is run from http://anonsvn.jboss.org/repos/portal/modules/test/trunk/remote/src/test/build.xml
      If you can run that test then you will be in a position to write similar test case for JBoss Portal.

      regards,
      Prabhat

        • 1. Re: automating jboss portal admin ui testing usign selenium
          leonidmir

          What I should download from the JBOSS repository before I can compile and run this test ?
          For example, I see all the imports at the beginning, where I can find these classes ?

          Regards,
          Leonid M.

          • 2. Re: automating jboss portal admin ui testing usign selenium
            prabhat.jha

            The test module code is at http://anonsvn.jboss.org/repos/portal/modules/test/trunk so you need to checkout this codebase. Then

            1. export PATH=/usr/lib/firefox-1.5.0.12:$PATH (for fedora)
            2. mvn -f test/pom.xml install -DJBOSS_4_2_1_HOME=/home/prabhat/jboss-4.2.2.GA

            This will run all tests in test module. I hope this helps.

            • 3. Re: automating jboss portal admin ui testing usign selenium
              vrockai

              what about jboss portal log? shouldn't it be published, too? during the testing i ussually have some errors in the main log output... something like

              12:08:10,706 INFO [DefaultLoadEventListener] Error performing load command
              org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jboss.portal.identity.db.HibernateRoleImpl#5]
               at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
               at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145)
               at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
               at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
               at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
              


              errors like this are fired quite often

              • 4. Re: automating jboss portal admin ui testing usign selenium
                prabhat.jha

                I did not understand your comment.

                • 5. Re: automating jboss portal admin ui testing usign selenium
                  vrockai

                  when i start jboss portal with run.sh it has an output to the screen. i guess this is what is going into server log files, too. but to be sure i start jboss with

                  run.sh > /tmp/jboss.log
                  


                  then when i run my testsuite i check the jboss.log file, and ussualy find few errors like that above in it. i'm asking if this errors should be ignored or archived.

                  • 6. Re: automating jboss portal admin ui testing usign selenium
                    prabhat.jha

                    Yes, this is a good idea but there are few issues:

                    There are cases when you will see error in the log for example if a producer URL is not valid you will see an error in log but on portal UI, code will consume the error and show a user friendly version of the error.

                    I think what you should do is grep for all ERROR in log and put them in a file and make that part of build artifacts. Then we would have to see if any of them is harmful. In most cases, harmful error will manifest in portal UI as well.

                    I hope I am explaining it clearly.

                    • 7. Re: automating jboss portal admin ui testing usign selenium
                      vrockai

                      issue in jboss portal 2.6.6 GA:
                      after a creation of file with no content (nothing typed into WYSIWYG Editor) i can click on the "preview" button. it seems that clicking this button has different functionality when the file has content, or is blank. on a blank file "preview" gives us ONLY the list of files in directory (which i guess is not correct functionality) but if the file has any text written in it, the preview opens the "WYSIWYG Editor" where it is able to see the content of file and change it AND the list of files in directory . user who didn't fill the content of their files are now unable to do it with preview button. is it correct?

                      • 8. Re: automating jboss portal admin ui testing usign selenium
                        prabhat.jha

                        Viliam, please create a new forum thread for this issue as it's not related to automation in hudson.