5 Replies Latest reply on Apr 3, 2015 3:42 AM by jujup

    Rhq agent plugin for "selenium test suite" ?

    jujup

      I would like to integrate some webapp test suite in RHQ. Ex: Go to a search form / search with some criteria / having the expected results.

       

      I'm was searching for an agent plugin to integrate some "selenium test suite", but I didn't found anything. Any idea ?

        • 1. Re: Rhq agent plugin for "selenium test suite" ?
          lzoubek

          Could you explain your use case? What would such plugin do? In what way do you want to integrate selenium?

          • 2. Re: Rhq agent plugin for "selenium test suite" ?
            jujup

            I want to have selenium test suite running (ex: every 10 minutes) locally in the agent for each deployed webapp. I want to have an RHQ  "business indicator" indicating not only that the webapp is deployed but that the webapp is functional.

             

            The selenium test suite can be : 1. Login in the webapp 2. I'm on the welcome page => ok 3. I search for a ticket 4. I found ticket. => ok.

            => In Rhq, seleniumTestSuite = UP // metric totalTimeScenario = 10 seconds.

             

            But there is maybe another way to have this indicator for each deployed webapp ?

            • 3. Re: Rhq agent plugin for "selenium test suite" ?
              tsegismont

              You could write your own plugin to start the suite (I'm not aware of a similar plugin in the community). The key problem is how you will connect Selenium to a browser on a production, headless machine. You could use PhantomJS.

              Honestly, if it was me I'd send simple, fabricated HTTP requests from the RHQ plugin to the application. Much easier to implement and does the job.

              • 4. Re: Rhq agent plugin for "selenium test suite" ?
                lzoubek

                Another option might be using Script Server resource, but you'd be missing totalTimeScenario metric. You can create a bundle that would contain some script which can start testsuites (you can either package your tests within bundle, or let the script check them out from SCM). Script Server resource can be used to run your script using scheduled operation, you can then setup an alert definition in case the operation fails (you can match script output using regular expression to determine success/failure).

                • 5. Re: Rhq agent plugin for "selenium test suite" ?
                  jujup

                  It seems to be a pretty solution ! Thank you Thomas and Libor !