check_selenium with Selenium Server 2.20.0 and Webdriver

Hi everyone,

I just pushed a new version of check_selenium to my github repository.
I generated a testcase with the current version of Selenium IDE, exported it as JUnit 4 (Webdriver) and ran it with my check. All seems to work. Hope this will help some of you to get their checks running.

As the generated testcase look a bit different, I had to strip the possibility to give url and browsertype as parameters.

7 comments:

GaryD said...

Hi Christian,
Im using your check_selenium and running a number of check and sending back to my (grounwork) nagios via passive mode with (nsca). One thing I have run into is that whenever the selenium checks fail, Im getting a UNKNOWN status
example)
UNKNOWN - com.example.tests.Pvh_testcase04_anonymousCart: Got some problems: com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms.

Is this to be expected, or am I using the
check_selenium incorrectly?

thanks
gary

Christian said...

Hi Gary,

in my opinion both is valid, UNKNOWN and CRITICAL.
check_selenium works with UNKNOWN, as you don't get a real error.

Christian

Thomas said...

Hello,

I am trying to get your latest version to run from GitHub.

Do I have to compiled version?

I am struggling with info.devopsabyss.CallSeleniumTest not found although CLASSPATH is set correct. Using Java7u7.

Thanks.

Christian said...

Hi Thomas,

sorry for the very late anwser.

github just contains the source code. You have to build it yourself. To do this, you have to use ant with the build.xml file of my project.

Christian

Ritu Goyal said...

Hi,

I am trying to integrate the nagios with selenium webdriver. The problem which i am facing is, everytime I am getting the below error:
UNKNOWN - com.example.tests.junitexampletest: Testcase class com.example.tests.junitexampletest not found! |

However, I am able to run the default example test provided with the package.

For my test class, I have kept the complied test class in "/usr/local/nagios/libexec/check_selenium-master/bin/com/example/tests/junitexampletest.class"

This is the classpath which I have set:
/usr/local/nagios/libexec/check_selenium-master/lib/commons-logging-1.1.1.jar:/usr/local/nagios/libexec/check_selenium-master/lib/httpclient-4.1.2.jar:/usr/local/nagios/libexec/check_selenium-master/lib/httpcore-4.1.3.jar:/usr/local/nagios/libexec/check_selenium-master/lib/commons-exec-1.1.jar:/usr/local/nagios/libexec/check_selenium-master/lib/json-20080701.jar:/usr/local/nagios/libexec/check_selenium-master/lib/guava-11.0.1.jar:/usr/local/nagios/libexec/check_selenium-master/lib/selenium-java-2.20.0.jar:/usr/local/nagios/libexec/check_selenium-master/lib/commons-cli-1.2.jar:/usr/local/nagios/libexec/check_selenium-master/lib/junit-4.8.1.jar:/usr/local/nagios/libexec/check_selenium-master/bin/com/example/tests/:/usr/local/nagios/libexec/check_selenium-master/lib/check-selenium.jar:/usr/local/nagios/libexec/check_selenium-master/lib/selenium-example-tests.jar

It would be great help if you can help in pointing out what i am doing wrong.

Thanks

Ritu Goyal said...

Resolved the problem, for me adding path to ".class" file did not worked. I created a jar file and added it to the classpath worked.

But now the problem which I am facing is while running through check_selenium.sh file, in the output, I am getting only the Execution time not the ping status, diskusage,memory,etc . If somebody can tell me the steps to define the configuration to get this as well in the output. It would be a great help and save lots of my time.

Thanks and Regards,
Ritu

Christian said...

Hi Ritu,

what du you meen by:
"I am getting only the Execution time not the ping status, diskusage,memory,etc ."

My plugin is only ment to run Selenium test cases with nagios. There are other plugins for nagios which will return diskusage and things like that.

Christian

Post a Comment