Plugin Information |
---|
No information for the plugin 'seleniumhq' is available. It may have been removed from distribution. |
This plugin allows you to run and load HTML Selenese suite result generate by Selenium Server from Seleniumhq. The Seleniumhq plug in can be downloaded here.
Jenkins will generate the trend report of test result.
Configuring the Seleniumhq Plugin
Global config
- Configure Seleniumhq test runner (selenium-server.jar path) (via Manage Jenkins -> Configure System)
Job config
- Install the selenium plugin (via Manage Jenkins -> Manage Plugins)
- Configure your project's build script to generate Seleniumhq HTML reports (See below for examples with Ant Command, batch Command and Jenkins build step)
- Enable the "Publish Selenium Report" publisher
- Specify the test file to load
- You can use '/' which will be the job workspace folder. The result file should be generated in this folder. You can click on the link "the workspace root" below to see if the report is available in the workspace folder.
Configuring build tools
Here are the configuration details for common build tools. Please feel free to update this with corrections or additions.
Build Step in Jenkins
You can lauch the HTML Selenese suite with selenium-server with the build step provided by this plugin.
This step makes exactly the same as Batch command (See below) but the plugin offers the possibility to enter an PATH or an URL for the suiteFile parameter.
- Add a build step (SeleniumHQ htmlSuite Run) in your job configure page
- Fill the mandatory field
- browser ex.: *iexplore, *firefox, etc.
- startURL: URL of the application to be tested
- suiteFile: The suite file with all the test cases. On Selenium IDE you can save a Test Case and a Test Suite. Save both and assign the test suite here. The file name might be needed to don't have spaces.
- resultFile: Use the full path with the report name: Ex: C:\Program Files\Jenkins\jobs\ApplicationToTest\workspace\Result.html . The result should be saved on workspace folder. You can have a folder inside to organize. This folder should be same as the Publish Selenium Report will read the report.
- other: port information an other options used on selenium server.
Batch command
- Add a build step (Execute Windows batch command) in your job configure page
- Add command to lauch HTML Selenese suite with selenium-server
java -jar selenium-server.jar -htmlSuite "*firefox" http://www.google.com "c:\absolute\path\to\my\HTMLSuite.html" "%WORKSPACE%\results.htm"
Ant
We've also provided an Ant task to make it easier to launch the tests. Run it like this: Seleniumhq doc
<taskdef resource="selenium-ant.properties"> <classpath> <pathelement location="selenium-server.jar"/> </classpath> </taskdef> <selenese suite="c:\absolute\path\to\my\HTMLSuite.html" browser="*firefox" results="c:\absolute\path\to\my\results.html" multiWindow="true" timeoutInSeconds="900" startURL="http://www.google.com" />
Result
Build summary
Build Report
Project summary
Project Report (Last build selenium report) P.S : If you need save all build report use "Archive the artifacts" in project config
Version History
Version 0.5 (upcoming)
- fix dependency on jre6 (JENKINS-7246)
Version 0.4 (2010-07-16)
- fix empty other field bug (JENKINS-6996)
Version 0.3 (2010-07-10)
- fix http 500 error thrown whilst saving a job on Jenkins 1.362+ JENKINS-6775
- Add possibility to use status of test commands instead of suites to determine UNSTABLE/FAILURE/SUCCESS JENKINS-6837
A checkbox has been added in advance propretie of publisher
Version 0.2 (2009-05-28)
- Add support for build on slave (Thank to Alexis)
- Add relative paths support for suite file (relative to the workspace) (Thank to Alexis)
- New icone (Thank to Erwan)
Version 0.1 (2009-01-23)
- Initial release.
66 Comments
Unknown User (erwan_nereide)
Pascal,
you've done exactly what we were planning to develop ! So you can imagine that I'm impatient to test it !
When will it be released ?
Unknown User (pascal_martin)
Release 0.1 is now available downloaded here
Unknown User (erwan_nereide)
Is it possible to use the environment variables to name the results files ? With this possibility, there will be no need to use the "Archive the artifacts" option.
What do you think of this idea ?
Unknown User (pascal_martin)
Not is not possible to use environment variables in the name.
But the file was generate in the workspace.
You can add other Build Task like windows batch command task to rename the file like:
rem Rename the file result index.html to index-%BUILD_NUMBER%.html
ren index.html index-%BUILD_NUMBER%.html
You can also copy file result to you prefered location
Unknown User (dtka)
Hello!
First of all, I wish to thank you very much for a usefull plugin!
I have a following question. The plugins provides a possibility to specify a URL to the suiteFile (e.g. in my case http://localhost/testslib/html/Login.html). As I understand a local copy of the suite file is created and executed. Unfortunately, I never succeeded to run a test providing an URL to the suiteFile because the test files (linked from the suite file) seem not to be downloaded. All I see the following error in the test's iframe of the TestRunner:
HTTP ERROR: 404
Not foundRequestURI=/selenium-server/tests/tests/login.html
Powered by Jetty://
Help would be greatly appreciated.
Thank you in advance,
Daniel Tkatch
Unknown User (pascal_martin)
Does he work well if you use a path like (C:\Login.html) ?
Make sure you enter the correct startURL like (http://localhost)
try add other param like (-avoidProxy)
Adjuste your part in your test suite.
Unknown User (lhsamad@gmail.com)
First off, thank you. This is a very help piece of coding.
I have a usage question. We are doing something like this but not so nicely integrated into Hudson. We run the selenium tests with ant and then parse the html file into Junit style reports.
What I would like to do is to simply use what you have developed and run my TestSuite.html from the Hudson dashboard rather then the build script, it will make the process much more flexible and easy to use. What I don't understand is how to pass some extra parameters to the "SeleniumHQ htmlSuite Run" build step.
How would I do that? Here is a listing of the parameters:
haltonfailure="true"
multiWindow="true"
timeoutInSeconds="3000"
firefoxProfileTemplate="/firefox-https-profile"
http://release.seleniumhq.org/selenium-remote-control/0.9.2/doc/server/org/openqa/selenium/server/ant/SeleneseAntTask.html
Unknown User (pascal_martin)
in the "other" box of "SeleniumHQ htmlSuite Run" build step add:
-timeout 3000 -firefoxProfileTemplate "/firefox-https-profile"
This parameter are added in command line exexute by the build step, see job log for complete command execute by the build step
Ex: java -jar selenium-server.jar -timeout 15600 -firefoxProfileTemplate "/firefox-https-profile" -htmlSuite «browser» «startURL» «suiteFile» «resultFile»
multiWindow is default option when run with selenium-server-1.0-beta-2
I think of selenium-server-1.0-beta-2 have no parameter for haltonfailure!
Unknown User (lhsamad@gmail.com)
Pretty sweet. I will try right away.
Unknown User (raghuraman.shanmugam@aspiresys.com)
Hi Pascal Martin,
First of all I appreciate the great work you did!
Currently, I have tried following stuffs:
Hudson 1.310
Selenium HQ plugin 0.2
Browser : *firfox, *ietha,etc..,
But Selenium IDE testscripts are NOT running at all
Could you please help out?
-------------------------------------------------------------------------------
Previously I used
Hudson 1.306
Selenium HQ plugin 0.1
Browser : *firfox, *ietha,etc..,
That time all worked fine
Thanks,
Raghuraman.Shanmugam
Unknown User (pascal_martin)
For me it work great with Hudson 1.310 , Selenium HQ plugin 0.2 and selenium-server-1.0-beta-2
What are your job log, (They hava error or warning ?)
Unknown User (raghuraman.shanmugam@aspiresys.com)
Hi Pascal,
Could you please tel me Where to find job log and other stuffs might be needed for investigation?
Thanks!
Unknown User (pascal_martin)
1- In your job Main Page Click on the build is failed

2- Click on Console Output

3- Now you can see the job log
Normally you find something like
[main] $ java -jar C:\selenium-server.jar *************
04:02:06.987 INFO - Java: Sun Microsystems Inc. 11.0-b16
04:02:06.987 INFO - OS: Windows XP 5.1 x86
04:02:06.987 INFO - v1.0-beta-2 [2571], with Core v1.0-beta-2 [2330]
04:02:07.137 INFO - Version Jetty/5.1.x
04:02:07.137 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
04:02:07.157 INFO - Started HttpContext[/selenium-server,/selenium-server]
04:02:07.157 INFO - Started HttpContext[/,/]
04:02:07.187 INFO - Started SocketListener on 0.0.0.0:4444
04:02:07.187 INFO - Started org.mortbay.jetty.Server@109a4c
04:02:13.231 INFO - Preparing Firefox profile...
04:02:15.734 INFO - Launching Firefox...
04:02:17.657 INFO - Checking Resource aliases
06:06:02.048 INFO - Checking Resource aliases
06:06:02.048 INFO - Received posted results
06:06:03.850 INFO - Killing Firefox...
Tests failed, see result file for details: *******************
06:06:04.942 INFO - Shutting down...
Publishing Selenium report...
Test failures: 22
Test totals : 237
Unknown User (raghuraman.shanmugam@aspiresys.com)
Hi Pascal,
Hudson : 1.306
Selenium RC server : selenium-server-1.0-beta-2
HQ plugin : 0.2
Error log :
Started by user anonymous
workspace $ java -jar d:\SeleniumRC\selenium-remote-control-1.0-beta-2\selenium-server-1.0-beta-2\selenium-server.jar -htmlSuite *firefox http://www.google.co.in/ig?hl=en d:\Google\googleTest.html report.html
17:25:19.756 INFO - Java: Sun Microsystems Inc. 11.3-b02
17:25:19.756 INFO - OS: Windows XP 5.1 x86
17:25:19.756 INFO - v1.0-beta-2 2571, with Core v1.0-beta-2 2330
17:25:19.910 INFO - Version Jetty/5.1.x
17:25:19.910 INFO - Started HttpContext/selenium-server/driver,/selenium-server/driver
17:25:19.910 INFO - Started HttpContext/selenium-server,/selenium-server
17:25:19.910 INFO - Started HttpContext/,/
17:25:19.922 INFO - Started SocketListener on 0.0.0.0:4444
17:25:19.922 INFO - Started org.mortbay.jetty.Server@201f9
17:25:19.961 WARN - It looks like your baseUrl (http://www.google.co.in/ig?hl=en) is pointing to a file, not a directory (it doesn't end with a /). We're going to have to strip off the last part of the pathname.
17:25:20.088 WARN - It looks like your baseUrl (http://www.google.co.in/ig?hl=en) is pointing to a file, not a directory (it doesn't end with a /). We're going to have to strip off the last part of the pathname.
17:25:20.318 INFO - Preparing Firefox profile...
17:25:26.349 INFO - Launching Firefox...
17:25:30.411 INFO - Checking Resource aliases
17:55:27.272 INFO - Killing Firefox...
HTML suite exception seen:
org.openqa.selenium.server.SeleniumCommandTimedOutException
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:102)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:141)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:632)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:236)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:194)
17:55:27.552 INFO - Shutting down...
Archiving artifacts
Publishing Selenium report...
ERROR: Test reports were found but none of them are new. Did tests run?
For example, C:\Documents and Settings\RAGHURAMAN.SHANMUGAM\.hudson\jobs\Job1\workspace\report.html is 4 days 20 hr old
Finished: FAILURE
I am not able attach screen ... problem with the server....
I try to attach in near future
Unknown User (pascal_martin)
Check if the command line stated by hudson (SeleniumHQ plugin ) is correct
(java -jar d:\SeleniumRC\selenium-remote-control-1.0-beta-2\selenium-server-1.0-beta-2\selenium-server.jar -htmlSuite *firefox http://www.google.co.in/ig?hl=en d:\Google\googleTest.html report.html)
1-In a batch window of Windows paste the command and run
2-Check the test start - execute and end normally
3-Check the result file
Y receive the same error SeleniumCommandTimedOutException when the selenium test not starded correctly by selenium-server.
Or the test need human action to make test continue.
Other cause, your testsuite is to long to execute
add extract param in other box of plugin like '-timeout 7200' for a timeout of 2 hours
The log you write say the SeleniumHq plugin run correctly but the selenium-server.jar not make the result file correctly because he reach a timeout.
Unknown User (raghuraman.shanmugam@aspiresys.com)
Hi Pascal,
Google page should be opened in the bottom window but it has been opened at the place where testcase is being displayed in the top window.
This issue seems very weird am not able to fix this never the less I tried your suggestions too...
Please help me out.
Thanks!
Unknown User (pascal_martin)
Try with extra paramter like -avoidProxy if it not work go to seleniumhq forum for extra help on selenium-server. When you are able to start selenim-server correctly in command line configure the hudson seleniumhq with the same parameter and it is supposed to work.
Unknown User (raghuraman.shanmugam@aspiresys.com)
Hi Pascal,
I did a stupid mistake that I had given Testcase file instead of Testsuite file in config page of Hudson job, so it was not running.
Now all working fine.
In future if any body faces same problem I had, Please ask them to check whether it is Testsuite or Testcase in the config page of a Hudson job
Thanks for the support
Unknown User (sireeshal)
Hi Pasacl,
I have been going throuhg the documentation and configure the SeleniumHQ plugin with Hudson,But when I build the project I am seeing the following error in the logs.
:\Hudson\jobs\Selenium\workspace>java -jar selenium-server.jar -htmlSuite "*firefox" http://corin.global.qadev.ecollege.com "c:\Hudson\jobs\Selenium\workspace\HTMLSuite.html" "C:\Hudson\jobs\Selenium\workspace\results.html"
12:51:20.667 INFO - Java: Sun Microsystems Inc. 17.0-b16
12:51:20.667 INFO - OS: Windows Server 2008 R2 6.1 amd64
12:51:20.683 INFO - v2.0 a2, with Core v2.0 a2
12:51:20.792 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
12:51:20.792 INFO - Version Jetty/5.1.x
12:51:20.792 INFO - Started HttpContext/selenium-server/driver,/selenium-server/driver
12:51:20.792 INFO - Started HttpContext/selenium-server,/selenium-server
12:51:20.792 INFO - Started HttpContext/,/
12:51:20.824 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@5ae80842
12:51:20.824 INFO - Started HttpContext/wd,/wd
12:51:20.839 INFO - Started SocketListener on 0.0.0.0:4444
12:51:20.839 INFO - Started org.openqa.jetty.jetty.Server@43256ea2
12:51:20.980 INFO - Preparing Firefox profile...
12:51:22.966 INFO - Launching Firefox...
12:51:23.701 INFO - Checking Resource aliases
12:51:24.639 INFO - Checking Resource aliases
This got stuck at Checking Resource alias.
HTMLSUITE.html file contains the following
<!Copyright 2004 ThgoughtWorks,Inc
Licensed under the Apache License,Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/license/LICENSE-2.0
Unless required by applicable law or agreed to in writing,software distributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the license.>
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>testsuite</title>
</head>
<body>
<table cellpadding="1" cellpadding="1"border="1">
<tbody>
<tr> <td><b>testsuite<b></td></tr>
<tr><td><a href="./testsuites.html">Login</a></td></tr>
</tbody>
</table>
</body>
</html>
testsuites.html is the test case and it contains this information...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://corin.ecollege-labs.com/" />
<title>testsuite</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">testsuite</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>Username</td>
<td>testprofsm</td>
</tr>
<tr>
<td>type</td>
<td>Password</td>
<td>test</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input@value='Go to Class'</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
I am not sure what I am doin wrong.Can you please help me out?
I also have one more question reg.HTMLSuite.Properites file,what is this for...
browser=*firefox,*iexplore
startURL=http://search.yahoo.com/
generateSuite=true
suite=suite
result=result
port=4444
timeout=1800
#singleWindow=true
#userExtensions=user-extensions.js
#proxyHost=localhost
#proxyPort=8888
#avoidProxy=true
#debug=true
#log=selenium.log
Unknown User (naku)
Is it possible to run a set of tests ?
e.g.
<selenese
files="c:\absolute\path\to\my\test*.html"
I don't want to maintain a test suite manually.
Thank you
Unknown User (pascal_martin)
SeleniumHQ htmlSuite Run not support this feature.
To resolve this, make a page web (php,asp,..) which builds the test suite and use this url for the test suite in the plugin.
Unknown User (naku)
Yep that's what I do (via an Ant script).
I would like to remove that extra step to make Selenium integration easier.
Unknown User (pascal_martin)
You can make update on the seleniumhq plugin to add one buildstep that make a htmlSuite from pattern send me the code and y integrate in the next version.
Unknown User (naku)
Pascal: I use Seleniumhq Plugin only to publish the test results, not to run the tests. For this I use an Ant task. The reason is I want to to run the tests BOTH from the developer's platform and from the CI server.
I aknowledge the lack of a fileset attribute is a problem from selenium HQ, not the plugin so I should rather contribute to them. What do you think?
Unknown User (pascal_martin)
To make Selenium integration easier, it possible to make you extra step by the seleniumhq plugin.
You can also make custom task in Ant Task, and contribute your work in selenium HQ.
I think the second option is better in you case. (Many people, have same requirement)
http://jira.openqa.org/browse/SRC-599
For people they not use Ant the first option is better.
Unknown User (vicd)
Did anybody experience resource conflicts - when multiple SeleniumHQ tasks attempt to use the same browser / Selenium server JAR? <at:var at:name=
My example: two builds complete closely in time, both start (different) SeleniumHQ smoketests using *iexplore, with a 90% probability neither of the test won't complete to success. After this:
==
12:16:30.712 INFO - Java: Sun Microsystems Inc. 14.1-b02
12:16:30.712 INFO - OS: Windows XP 5.1 x86
12:16:30.728 INFO - v1.0.1 2696, with Core v
12:16:30.931 INFO - Version Jetty/5.1.x
12:16:30.931 INFO - Started HttpContext/selenium-server/driver,/selenium-server/driver
12:16:30.931 INFO - Started HttpContext/selenium-server,/selenium-server
12:16:30.931 INFO - Started HttpContext/,/
12:16:31.181 INFO - Started SocketListener on 0.0.0.0:4332
12:16:31.181 INFO - Started org.mortbay.jetty.Server@dbe178
12:16:33.853 INFO - Launching Embedded Internet Explorer...
12:16:34.884 INFO - Launching Internet Explorer HTA...
==
nothing happens. A fantom iexplore.exe process is reported by the task manager; all further attempts to run SeleniumHQ steps with *iexplore also fail until this process is killed.
Workarounds:
1. Spread the SeleniumHQ runs in time. Ensure no overlapping.
2. Use the Build Timeout plugin to abort the stuck job. I'm not sure whether this will correctly kill the stuck browser process though.
—
Question closed (follow the answer of Selenium Grid team)
Selenium Grid does not officially support running multiple Internet Explorer on a single Windows machine. This is mostly because:
Currently, the only robust solution for running multiple IE instances on a single machine with Selenium Grid is to use virtualization (multiple VMs, a single IE instance per VM).
Unknown User (pascal_martin)
Other solutions is use only one job executor to force job to run in sequential order.
Also you can use job dependency to force one job to run after en other
Ex: Selenium job2 is started after Selenium job1 ending
Unknown User (joffroy)
How to use slave machine to run test suite ?
I've got a lot of problems making it working
is there a tutorial ?
How do configure selenium-server.jar path in order to allow the slave to access it ? (copy it on slave manually ?)
How do create a selenium test suite that will make the slave be able to locate each tests (currently path are relative in TestSuite file) ?
thanks in advance
Unknown User (pascal_martin)
How do configure selenium-server.jar path in order to allow the slave to access it ? (copy it on slave manually ?)
The selenium-server.jar need to be installed in exactly same directory configured in (via Manage Hudson -> Configure System)
How do create a selenium test suite that will make the slave be able to locate each tests (currently path are relative in TestSuite file) ?
Normaly each tests of the test suite need to be in http server you test (startUrl)
Unknown User (hana)
I've tried to configure this plugin with Hudson but no success till now. I've been using Selenium RC successfully till now and I know my tests run correctly but when I tried the above configuration - Build step in Hudson and building the project it always tells me that the suiteFile is not a file!!
"D:\selenium\tests\login.html"
can someone tell me what is wrong with the above path? why it continues to say that my test suite is not a file?
many thanks...I'm really stuck with this issue :(
Unknown User (pascal_martin)
Login.html name like a testfile not a suite file (Check you make a testSuite not a testFile)
Also Try with url otherwise of full absolute file path
Url of the test suite (e.g. "http://localhost/tests/TestSuite.html")
Suite file containt like :
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
<title>Test Suite</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<tbody>
<tr><td><b>Test Suite</b></td></tr>
<tr><td><a href="./login.html">TestLocators</a></td></tr>
</tbody>
</table>
</body>
</html>
Unknown User (hana)
Hi Pascal,
thanks for your reply. I figured out yesterday that the problem was with the "" I was using, after I removed them everything was fine :)
Unknown User (partizan77)
I use Seleniumhq Plugin Vers. 0.20 & Hudson Vers. 1.362.
I tried to configure a job but when I try to save I always get this exception.
Status Code: 500
Exception:
Stacktrace: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class hudson.plugins.seleniumhq.SeleniumhqPublisher
at org.kohsuke.stapler.RequestImpl.loadConstructorParamNames(RequestImpl.java:461)
at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:285)
at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:281)
...
see more
Unknown User (pascal_martin)
Thank to report this,I check this when y have time. Use the Batch command or ant task like is show in this page to bypass this probleme.
Unknown User (markmandel)
I just ran into the same issue.
I use ANT to run Selenium Server, but attempting to put any value in Publish Selenium Report, produces the same error: org.kohsuke.stapler.NoStaplerConstructorException
So I can run Selenium scripts, but I can't seem to import the results into Hudson, which doesn't make them very useful :(
Is there a way to work around this issue at all?
I see there is also a bug at: http://issues.jenkins-ci.org/browse/JENKINS-6775
Thanks for this great plugin, but I'm a little stuck now :(
Unknown User (emidiostani)
Hi Pascal,
thanks for correcting the bug for error 500, after upgrading from 0.2 to 0.3 it is possible now to see the report.
I have 2 questions/issues:
1) if I use the form "SeleniumHQ htmlSuite Run" in the build step configuration I have the error:
I noticed in the command a space after the selenum-server.jar in the output (I checked at global level in the selenium-server path and I don't have spaces after), with 0.2 version I didn't have problems. To bypass it I use the shell command directly and I don't have problems.
2) the Selenium Test Result Trend graph seems to take in consideration only builds succeded and then I don't see in the graph failure tests in red. In other words if I have failed build because of a failed test then the test graph doesn't take consideration that build number on the x axis so at the end I have only a blue graph.
Thanks in advance for your time !
Emidio Stani (Hudson 1.365, JDK 1.6, Ubuntu 9.10)
Unknown User (pascal_martin)
1) try this command un a shell and try discovery what is bad is this command, try change port number in the other field in hudson job (-port 4444 -timeout 15600 )
java -jar /home/marco/Desktop/selenium-server-1.0.3/selenium-server.jar -htmlSuite *firefox http://localhost/ /home/marco/Desktop/testsuite.html /var/lib/hudson/jobs/ewsi/workspace/ewsi-svn/result.html
2) normaly when job are un red is because execution of test failed and the result file is empty, when job are in yello test work with failed test and you should see blue and red in the graph like image sample in this wiki (Project summary)
Unknown User (roman.fenkhuber@oeaw.ac.at)
I had the same problem. The "other" field causes this. If it is left empty selenium exits with an error. Just fill in an argument that won't hurt like "-singleWindow", or apply this patch:
Unknown User (pascal_martin)
Patch apply in version 0.4, thank
Unknown User (emidiostani)
Thanks, it works !
Unknown User (cringe)
Is it possible to run multiple test suites with the plugin? I have a directory with multiple subdirectories with each 1 TestSuite and multiple TestCases. Right now I'm trying to figure out how to create a "major" TestSuite that includes all TestCases from the subdirectory with a little script. But it would be much easier to point to something like "**/*TestSuite.html" instead of only 1 file.
Unknown User (marty)
Hello, Pascal Martin
I got some errors, I have been researching for some time, but I am not able to resolve it. Could you please give some suggestion?22:47:53.794 INFO - Version Jetty/5.1.x
22:47:53.795 INFO - Started HttpContext/selenium-server/driver,/selenium-server/driver
22:47:53.795 INFO - Started HttpContext/selenium-server,/selenium-server
22:47:53.795 INFO - Started HttpContext/,/
22:47:53.806 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@1c92535
22:47:53.806 INFO - Started HttpContext/wd,/wd
22:47:53.809 INFO - Started SocketListener on 0.0.0.0:4444
22:47:53.809 INFO - Started org.openqa.jetty.jetty.Server@a37368
22:47:53.924 INFO - Preparing Firefox profile...
(firefox-bin:29331): Gdk-WARNING **: locale not supported by Xlib
(firefox-bin:29331): Gdk-WARNING **: can not set locale modifiers
(firefox-bin:29331): Gtk-WARNING **: cannot open display:
HTML suite exception seen:
java.lang.RuntimeException: Timed out waiting for profile to be created!
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:348)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:124)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:91)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchHTMLSuite(FirefoxChromeLauncher.java:393)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:545)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:239)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:198)
22:48:14.027 INFO - Shutting down...
Unknown User (pascal_martin)
I have no idea to solve your bug. Check with the develloper of selenium-server http://seleniumhq.org/
http://www.linuxquestions.org/questions/linux-software-2/gdk-warning-locale-not-supported-by-xlib-448869/
Unknown User (arzala)
From Hudson 1.374 we have noticed that this plugin/hudson is not able to kill virtual screen and firefox process when selenium tests are finished. This was working properly before that. Following is output from build log.
===========================================================================
[workspace] $ java -jar /home/hudson/selenium-2.0a5/selenium-server-standalone-2.0a5.jar -ensureCleanSession -timeout 3600 -htmlSuite *firefox http://www.myproject.xyz /home/hudson/jobs/MyProject/workspace/demo1/test/functional/selenium/backend/TestSuite.html /home/hudson/jobs/MyProject/workspace/build/selenium/backend.html
01:59:47.257 INFO - Java: Sun Microsystems Inc. 14.0-b16
01:59:47.259 INFO - OS: Linux 2.6.18-164.11.1.el5xen amd64
01:59:47.294 INFO - v2.0 [a5], with Core v2.0 [a5]
01:59:47.471 INFO - RemoteWebDriver instances should connect to: http://192.168.10.223:4444/wd/hub
01:59:47.472 INFO - Version Jetty/5.1.x
01:59:47.472 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
01:59:47.473 INFO - Started HttpContext[/selenium-server,/selenium-server]
01:59:47.473 INFO - Started HttpContext[/,/]
01:59:47.541 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@663e89c3
01:59:47.542 INFO - Started HttpContext[/wd,/wd]
01:59:47.545 INFO - Started SocketListener on 0.0.0.0:4444
01:59:47.545 INFO - Started org.openqa.jetty.jetty.Server@66edc3a2
01:59:47.698 WARN - Caution: '/usr/bin/firefox': file is a script file, not a real executable. The browser environment is no longer fully under RC control
01:59:47.777 INFO - Preparing Firefox profile...
01:59:51.299 INFO - Launching Firefox...
01:59:52.112 INFO - Checking Resource aliases
02:08:36.439 INFO - Checking Resource aliases
02:08:36.439 INFO - Received posted results
02:08:37.929 INFO - Killing Firefox...
02:08:39.327 INFO - Shutting down...
02:08:39.327 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]
===========================================================================
From log it can be seen that Hudson is trying to kill firefox instance but when we check process list on server, we see many processes still active as shown below:
==================================================
/usr/bin/Xvfb :1 -ac -screen 0 1024x768x24
/usr/lib64/firefox-3.6/firefox -profile /tmp/customProfileDir423441
/usr/lib64/firefox-3.6/firefox -profile /tmp/customProfileDir387548
==================================================
There are also directories like "/tmp/customProfileDir423441" which we need to clean-up manually after every build. We use Headless Linux 2.6.18-164.11.1.el5xen, Hudson 1.379, Firefox-3.6 and use following commands to initiate selenium testing
/usr/bin/Xvfb :1 -ac -screen 0 1024x768x24 2>&1 >/dev/null &
browser: *firefox
startURL: http://www.myproject.xyz
suiteFile: demo1/test/functional/selenium/frontend/TestSuite.html
resultFile: build/selenium/frontend.html
other: -ensureCleanSession -timeout 3600
Following is in error log, but I am not sure whether it is related to this issue or not. Let me know if you need more details.
=================================================================================
Oct 8, 2010 8:29:24 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Workspace clean-up. 1 ms
Oct 8, 2010 8:29:24 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Workspace clean-up
Oct 8, 2010 8:22:08 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/checkstyle-warnings.xml for build 16
Oct 8, 2010 8:21:21 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/checkstyle-warnings.xml for build 16
Oct 8, 2010 7:11:23 AM hudson.model.DownloadService$Downloadable doPostBack
INFO: Obtained the updated data file for hudson.tools.JDKInstaller
Oct 8, 2010 7:11:23 AM hudson.model.DownloadService$Downloadable doPostBack
INFO: Obtained the updated data file for hudson.tasks.Ant.AntInstaller
Oct 8, 2010 7:11:23 AM hudson.model.DownloadService$Downloadable doPostBack
INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
Oct 8, 2010 7:00:55 AM hudson.model.Hudson$4 onAttained
INFO: Loaded all jobs
Oct 8, 2010 7:00:55 AM hudson.model.Hudson$4 onAttained
INFO: Started all plugins
Oct 8, 2010 6:54:56 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/checkstyle-warnings.xml for build 16
Oct 8, 2010 6:54:40 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/checkstyle-warnings.xml for build 16
Oct 8, 2010 6:54:17 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/checkstyle-warnings.xml for build 16
Oct 8, 2010 6:53:36 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/checkstyle-warnings.xml for build 16
Oct 8, 2010 6:52:49 AM hudson.plugins.analysis.core.BuildResult loadResult
INFO: Loaded data file /home/hudson/jobs/MyProject/builds/2010-10-08_00-00-18/pmd-warnings.xml for build 16
Oct 8, 2010 2:08:41 AM hudson.model.Run run
INFO: MyProject #16 main build action completed: SUCCESS
Oct 8, 2010 1:43:41 AM hudson.Proc$LocalProc join
WARNING: Process leaked file descriptors. See http://hudson.gotdns.com/wiki/display/HUDSON/Spawning+processes+from+build for more information
java.lang.Exception
at hudson.Proc$LocalProc.join(Proc.java:232)
at hudson.Launcher$ProcStarter.join(Launcher.java:280)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
at hudson.model.Build$RunnerImpl.build(Build.java:174)
at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
at hudson.model.Run.run(Run.java:1280)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:137)
Oct 7, 2010 5:59:37 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Fingerprint cleanup. 0 ms
Oct 7, 2010 5:59:37 PM hudson.model.FingerprintCleanupThread execute
INFO: Cleaned up 0 records
Oct 7, 2010 5:59:37 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Fingerprint cleanup
Oct 7, 2010 1:29:57 PM hudson.model.Descriptor verifyNewInstance
WARNING: Father of com.thalesgroup.dtkit.metrics.hudson.model.PHPUnitHudsonTestType@2f3cf887 and its getDescriptor() points to two different instances. Probably malplaced @Extension. See http://hudson.361315.n4.nabble.com/Help-Hint-needed-Post-build-action-doesn-t-stay-activated-td2308833.html
Oct 7, 2010 1:29:04 PM hudson.TcpSlaveAgentListener
INFO: JNLP slave agent listener started on TCP port 37972
Oct 7, 2010 1:29:04 PM hudson.model.Hudson$4 onAttained
INFO: Completed initialization
Oct 7, 2010 1:29:01 PM hudson.model.Hudson$4 onAttained
INFO: Loaded all jobs
Oct 7, 2010 1:28:58 PM hudson.model.Hudson$4 onAttained
INFO: Started all plugins
Oct 7, 2010 1:28:58 PM hudson.model.Hudson$4 onAttained
INFO: Prepared all plugins
Oct 7, 2010 1:28:55 PM hudson.model.Hudson$4 onAttained
INFO: Listed all plugins
Oct 7, 2010 1:28:55 PM hudson.ClassicPluginStrategy createPluginWrapper
INFO: Plugin subversion.hpi is disabled
Oct 7, 2010 1:28:55 PM hudson.ClassicPluginStrategy createPluginWrapper
INFO: Plugin maven-plugin.hpi is disabled
Oct 7, 2010 1:28:55 PM hudson.ClassicPluginStrategy createPluginWrapper
INFO: Plugin clover.hpi is disabled
Oct 7, 2010 1:28:55 PM hudson.ClassicPluginStrategy createPluginWrapper
INFO: Plugin ssh-slaves.hpi is disabled
Oct 7, 2010 1:28:55 PM hudson.ClassicPluginStrategy createPluginWrapper
INFO: Plugin scis-ad.hpi is disabled
Oct 7, 2010 1:28:55 PM hudson.ClassicPluginStrategy createPluginWrapper
INFO: Plugin warnings.hpi is disabled
Oct 7, 2010 1:28:55 PM hudson.model.Hudson$4 onAttained
INFO: Started initialization
=================================================================================
Unknown User (simon@9starresearch.com)
I successfully configured this module with Hudson but the build does not stop when there are errors. These errors can range from exceptions thrown from the selenium server or if testcases fail. The thing just continues on, and the only way I know it succeeds is if I check the results page. Is this the intended behavior or what? I'd like for it to halt the build if any part of my testsuite fails.
Unknown User (pascal_martin)
Try configure the lauch test with a Batch Command, (java -jar selenium-server.jar -htmlSuite "*firefox" http://www.google.com"c:\absolute\path\to\my\HTMLSuite.html" "%WORKSPACE%\results.htm") http://seleniumhq.org/docs/05_selenium_rc.html#from-selenese-to-a-program
And use only the part of the plugins where it load the result (Publish selenium report)
Unknown User (guillaume.lasnier@mac.com)
I am running selenium test using the selenium-maven-plugin. Would it be possible to have the Publish Selenium Report available in post-build action for Maven2 job?
Thank you
Unknown User (guillaume.lasnier@mac.com)
This request is reported by the following Jira improvement : http://issues.jenkins-ci.org/browse/JENKINS-5796
I attached the patch to the issue to fix this.
Unknown User (pascal_martin)
Thank i'm put your fix in the next release
Unknown User (okcorp)
Hello.
OS - Ubuntu
Jenkins - Last
using "Build Step in hudson"
t seems to me that user jenkins have not all the rights, because if i use the same line to execute in terminal, it works selenium starts Firefox & do the suite.
I also put jenkins user in groop root but it also doesn't help.
I'm not qualified in Linux but it seems than trouble is with rights of jenkins user, but i can mistake.
the bug in jenkins
11:26:24.652 INFO - Started org.openqa.jetty.jetty.Server@ab50cd 11:26:24.738 INFO - Preparing Firefox profile... HTML suite exception seen: java.lang.RuntimeException: Timed out waiting for profile to be created! at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360) at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:114) at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:83) at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchHTMLSuite(FirefoxChromeLauncher.java:405) at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchHTMLSuite(FirefoxLauncher.java:105) at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121) at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166) at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:556) at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:241) at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:201) at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:40)
Unknown User (mvance)
okcorp okcorp,
Try setting the Display environment variable, as outlined under the Configure Hudson section in this Hudson and SeleniumTest Suite post. For me, setting DISPLAY to :0.0 worked.
Unknown User (theschles)
We'd rather run Selenium Server & Firefox on a different PC than Jenkins. How do we configure this plugin to point to IP x, port 4444?
Unknown User (pascal_martin)
To do that you need to install a slave hudson client on this different pc and run your job with this slave. It is important that the path of the selenium-server.jar is the same on hudson master and hudson slave.
Unknown User (theschles)
Ah, ok. Thanks for the quick reply.
Unknown User (theschles)
Next question: how do I declare a selenese test is dependent on another selenese test?
Unknown User (pascal_martin)
I think the solution is make 2 job and make on job build after the other
Unknown User (ochacon)
Hi All,
Link at top : "The Seleniumhq plug in can be downloaded here." appears to be broken...
could someone please provide an updated link?
Thanks,
O.
Unknown User (pascal_martin)
Fixed http://mirrors.jenkins-ci.org/plugins/seleniumhq/
Unknown User (ochacon)
Thanks Pascal - in reviewing the URL provided not seeing a .hpi file - that's what Jenkins wants to install a plug-in correct? Please advsie...
Unknown User (theschles)
How do I configure SeleniumHQ to execute tests in parallel?
Unknown User (pascal_martin)
Dount configure SeleniumHQ but configure jenkin by making many job and add executor, adding some slave. If you run to job with selenium-server on the same executor you need to run selenium-server with different port and i think you can only run differente broswer im not sure.
Unknown User (theschles)
So your recommendation to run tests in parallel is to create separate Jenkins jobs, each running their own test suite, and have the Jenkins execute the jobs simultaneously, using Jenkins's own built-in methods for dividing jobs up being Jenkins masters and Jenkins slaves?
Per your answer up above, each Jenkins master & slave must then run Selenium Server locally -- but if that's so, how does one pass in a Selenese HTML file from the master to the slave (as your instructions state one must specify which Selenese HTML file to pass to the Selenium Server)? Does Jenkins configure the slave to do the same SVN checkout?
Unknown User (mcmagic)
Pascal, I have been trying to get the SeleniumHQ plugin to work with Jenkins for days with no success.
Here is what the configuration looks like in Jenkins:
However, when I attempt to build, this is what is displayed in the console:Jun 19, 2012 12:47:57 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
12:47:58.669 INFO - Java: Sun Microsystems Inc. 17.1-b03
12:47:58.674 INFO - OS: Linux 2.6.18-194.26.1.el5 amd64
12:47:58.709 INFO - v2.21.0, with Core v2.21.0. Built from revision 16552
12:47:59.062 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
12:47:59.064 INFO - Version Jetty/5.1.x
12:47:59.064 INFO - Started HttpContext[]
12:47:59.065 INFO - Started HttpContext[]
12:47:59.066 INFO - Started HttpContext[]
12:47:59.130 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@7d26f75b
12:47:59.131 INFO - Started HttpContext[]
12:47:59.140 INFO - Started SocketListener on 0.0.0.0:4444
12:47:59.140 INFO - Started org.openqa.jetty.jetty.Server@55e83f9
12:47:59.216 WARN - Caution: '/usr/bin/firefox': file is a script file, not a real executable. The browser environment is no longer fully under RC control
12:47:59.413 INFO - Preparing Firefox profile...
12:48:03.992 INFO - Launching Firefox...
12:48:05.447 INFO - Checking Resource aliases
...and then it hangs indefinitely.
I attempted to see if the tests were just running and not generating any output, so I ran the following while the selenium server seemed to be hanging:
>> xwd -out Screentest.xwd -root -display :99
>> convert Screentest.xwd screenshot.png
here is the resulting screenshot:
this is test suite that runs fine from the selenium IDE. Do you have any suggestions? Thanks alot!
Unknown User (pascal_martin)
I think is more flexible for you don't use SeleniumHq htmlSuite run and directly use selenium server in bat or shell script (Use only the publish selenium report option)Ex: java -jar selenium-server.jar -htmlSuite "*firefox" http://www.google.com" c:\absolute\path\to\my\HTMLSuite.html" "%WORKSPACE%\results.htm"
check the official doc for more help http://seleniumhq.org/docs/05_selenium_rc.html#run-selenese-directly-within-the-server-using-htmlsuite
Unknown User (seelniumff)
Hi! I have properly configured the selenium hq plugin into Jenkins. I've also tried to run it in my local Jenkins, and it worked. The problems I encounter are as follows:
1. suiteFile directory reads from C drive ONLY. Example, C:\TestSelenium\testSuite.html
When I try to specify the absolute path to my test suite (workspace), I get the error "The suiteFile is not a file or an url ! Check your build configuration."
Same thing happens with resultFile
2. When I add post-build action "Publish Selenium Report," I'm getting an error because the newly created resultFile is saved into C:\TestResult\result.html and not in the workspace.
Someone please help me. Thanks.
Unknown User (vitaly_il)
Is there a way to keep "resultFile" per build? I tried to use $BUILD_NUMBER as part of "resultfile", but w/o success.
Any suggestions?