Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Selenium RC jar hangs on running the -htmlSuite with test cases/suites generated by Selenium IDE #1759

Closed
lukeis opened this issue Mar 2, 2016 · 33 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 1759

What steps will reproduce the problem?
1.  Create a test suite with the IDE with more than one testcase in it
2.  Run the selenium RC java jar with the -htmlSuite option 
3.  It hangs until timeout

-----------------------------------------------------
What is the expected output? What do you see instead?

It seems to hang when I run the following command:

java -jar "../selenium-server-standalone-2.0b3.jar" -timeout 600 -htmlSuite "*firefox"
"http://seleniumhq.org/" "/<path_to>/testcase_rc_hangs/testSuite"  results.html 

But runs ok for

java -jar "../selenium-server-standalone-2.0b3.jar" -timeout 600 -htmlSuite "*firefox"
"http://seleniumhq.org/" "/<path_to>/testcase_rc_ok/testSuite"  results.html 

I the only difference between the two is that I yanked out the first two lines of each
file.  The ones starting with:
   xml version...
   DOCTYPE html PUBLIC...

I don't know why this cause the scripts to start working and not hanging.  But it is
a pain because my testers keep checking the scripts from the Selenium IDE and hanging
our continuous integration tests.

I have attached the two sets of files which run against the seleniumhq.org web servers.

-----------------------------------------------------
What version of the product are you using? On what operating system?

selenium-server-standalone-2.0b3.jar
Selenium IDE 1.0.11
FireFox 3.6.17
Mac OS X 10.6.7

-----------------------------------------------------
Please provide any additional information below.

I have not filed a separate bug but relative paths to the testSuite file do not work
and do not give a good error back to the user.  This should either fail at jar launch
with an error or work.  Bringing up html with 404 and proxy fail is really, really,
really, ridiculously confusing to new users of this product.

cd /<path_to>/testcase_rc_ok
java -jar "../selenium-server-standalone-2.0b3.jar" -timeout 600 -htmlSuite "*firefox"
"http://seleniumhq.org/" testSuite results.html -debug

throws back:
...
16:01:37.674 DEBUG - Handler org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
16:01:37.675 DEBUG - Handled by org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
16:01:37.675 DEBUG - RESPONSE:
HTTP/1.1 403 Forbidden+for+Proxy

And has a 404 on the web page.


While the full path works:
 java -jar "../selenium-server-standalone-2.0b3.jar" -timeout 600 -htmlSuite "*firefox"
"http://seleniumhq.org/" "/<path_to>/testcase_rc_ok/testSuite"  results.html -debug

Reported by fuzzydolphin on 2011-06-04 23:09:10


- _Attachment: [testcases.zip](https://storage.googleapis.com/google-code-attachments/selenium/issue-1759/comment-0/testcases.zip)_
@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

in my case it does not run at all, only from the Selenium IDE

if I do not provide a -timeout 30 at command line it does not even give an error back...
it just hangs there waiting for something

$ java -jar ~/tmp/selenium-server-standalone-2.7.0.jar -timeout 30 -htmlSuite *firefox
'http://txtr.com' ~/tmp/selenium/txtr-try2 ~/Desktop/txtr-try1.html 
Sep 30, 2011 2:31:03 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
14:31:05.924 INFO - Java: Apple Inc. 20.1-b02-384
14:31:05.927 INFO - OS: Mac OS X 10.6.8 x86_64
14:31:05.941 INFO - v2.7.0, with Core v2.7.0. Built from revision 13926
14:31:06.062 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
14:31:06.063 INFO - Version Jetty/5.1.x
14:31:06.064 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
14:31:06.065 INFO - Started HttpContext[/selenium-server,/selenium-server]
14:31:06.065 INFO - Started HttpContext[/,/]
14:31:06.126 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@2e958bb8
14:31:06.126 INFO - Started HttpContext[/wd,/wd]
14:31:06.132 INFO - Started SocketListener on 0.0.0.0:4444
14:31:06.132 INFO - Started org.openqa.jetty.jetty.Server@69f78ef1
14:31:06.218 INFO - Preparing Firefox profile...
14:31:08.039 INFO - Launching Firefox...
14:31:08.660 INFO - Checking Resource aliases
14:31:38.073 INFO - Killing Firefox...
HTML suite exception seen:
org.openqa.selenium.server.SeleniumCommandTimedOutException

(I removed the first 2 lines from the attached sample, to test ur workaround)

Reported by guido.serra on 2011-09-30 12:36:52


- _Attachment: [txtr-try2](https://storage.googleapis.com/google-code-attachments/selenium/issue-1759/comment-1/txtr-try2)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by barancev on 2011-10-12 21:33:04

  • Labels added: Component-RC, Component-IDE

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I'm experiencing the same anomalies with the following versions:

selenium-server-standalone-2.4.0.jar
mac os x 10.6.8
firefox 6.0
selenium ide 1.3.0

Reported by scottnelsonsmith on 2011-10-17 22:35:05

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

The same problem here.
Any workaround ?

Reported by fedecarpi on 2011-11-10 20:37:23

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am trying to run selenese scripts (1 test suite and 2 test cases in it) from jenkins
using the seleniumhq plugin. The first test case is executed in firefox and hangs without
continuing to the second test case.

Reported by image.gif on 2011-11-22 11:30:47

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

All active development is focused on Selenium 2.0 (the WebDriver APIs).  Updating issue
priority accordingly.

Reported by jmleyba on 2012-01-04 03:06:21

  • Labels added: Priority-Low

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Removing IDE component as the saved file format has not changed. The same first two
lines have been there since 2008, so this issue is most likely within core/RC. That
said, I suspect this will be set to WontFix because the TestRunner is not being actively
maintained. The recommended approach is currently to export Selenium IDE tests to a
WebDriver or RC format and execute them using one of the mature programming languages
available.

Reported by dave.hunt on 2012-03-02 00:06:34

  • Status changed: Accepted
  • Labels removed: Component-IDE

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

This issue is still present in selenium-server 2.20.

Reported by speltaunimib on 2012-04-05 12:42:12

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I can verify that this issue is also present for selenium-server 2.23.0

Reported by dkinzer_old@jenkinslaw.org on 2012-06-08 21:20:02

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

The issue is still present in selenium-server 2.25.0.

Reported by aymeric.caroff on 2012-08-30 09:20:24

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Does anyone know of a workaround for this issue:

https://code.google.com/p/selenium/issues/detail?id=1759

My offshore team is using the Selenium WebDriver 2.25 and claims that the issue above
(Selenium 1759) is preventing the tests from running unattended.  This requires an
engineer to kick off and monitor the scripts as they run.  If there is no workaround
the automation is essentially useless for us.

Here is some more detail from our offshore team:

I can say that problem is known long time ago and by client as well, discussed more
than year ago. We could not find reasonable solution.

The fast goggling found few “our” issues easily:

https://code.google.com/p/selenium/issues/detail?id=1759 – Selenium hangs on running
the -htmlSuite with test cases/suites generated by Selenium IDE – still not fixed known
bug
https://code.google.com/p/selenium/issues/detail?id=4284 - Setting FirefoxDriver Profile
hangs FF14
…

Also from changelog https://code.google.com/p/selenium/source/browse/trunk/java/CHANGELOG
I can see that several severe hang issues were fixed for webdriver, which we are not
use still because support legacy Selenium 1 codebase.

Also there are some forum discussions like http://www.seleniumwebdriver.com/google-selenium-webdriver/findelements()-hangs-when-implicitlywait-is-set/
without any suggestions but which confirm issues with Selenium on different users.

In general Google provide more 700.000 pages for “selenium hang” search request, so
I assume there are known issues with selenium

Anyway we are aimed to work further over clarification, looking inside issues, may
be we can ask ourself on forums and/or improve our scripts with additional timeout
settings to get any response from locked thread and repeat test case

Reported by kevin.sheehan on 2012-09-19 12:44:49

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi.

> Does anyone know of a workaround for this issue:

I released selenese-runner-java that is an interpreter of html test case/suite.

https://github.com/vmi/selenese-runner-java

Is this helpful? 

Reported by vmi@nifty.com on 2012-09-19 13:46:53

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Here's what I think several people get hung up on trying to get this working. The flow-control
extension needed for the RC cmdline using -htmlSuite is *different* than the flow-control
extension needed for IDE! I wrote a blog early last year on how to do data-driven testing
with the RC cmdline using -htmlSuite. Step-1 gives the link to the extension needed.
Here's the blogZ: http://maryannmp.wordpress.com/2011/02/23/data-driven-testing-with-selenium-rc-html-tests/

Note that I just now re-ran the steps from my blog and they still work fine (although
the test case fails because the .xml data is so out-of-date). I then swapped out the
extension needed for the RC cmdline and swapped in the IDE one. That caused the exact
failure being discussed above--everything hangs after "Checking Resource aliases."



Reported by maryann.maypumphrey on 2012-10-14 18:16:44

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am still having this problem. Selenium RC Server hangs on "INFO - Started SocketListener
on...."


Any solution, please need help

Reported by Cauvery@insurancebrokers.com on 2013-05-16 22:19:24

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Isn't this problem solved by giving the testsuite file a .html extension? I remember
having the same weird issues that were solved by naming the testsuit file properly.

Reported by raj.bos on 2013-06-11 12:29:58

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

still having the "checking resource aliases" problem

Using latest Firefox 23.0.1 and standalone-server 2.35.0

Reported by rdekleijnaspider on 2013-09-11 07:39:49

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

This issue was closed by revision 2b6b34fa91c6.

Reported by barancev on 2013-09-11 09:58:05

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Extension is in place but the script still hangs at "checking resource aliases". Any
solution for this ?

Reported by rdekleijnaspider on 2013-09-15 13:42:35

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

OK, please provide a sample suite to reproduce the issue.

Reported by barancev on 2013-09-15 18:08:18

  • Status changed: NeedsClarification

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Even after download the latest Selenium software, still hangs at 'checking resource
aliases'.
Anything I can provide to help resolve this issue? Below is the log:
MacBook-Pro:Downloads test$ java -jar selenium-server-standalone-2.35.0.jar -htmlSuite
"*chrome" "http://test.ensighten.com" /Users/test/Downloads/manage.a/uth.test4.html
/tmp/se.log
Sep 27, 2013 12:06:35 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
12:06:41.251 INFO - Java: Apple Inc. 20.51-b01-457
12:06:41.251 INFO - OS: Mac OS X 10.8.5 x86_64
12:06:41.259 INFO - v2.35.0, with Core v2.35.0. Built from revision c916b9d
12:06:41.341 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
12:06:41.342 INFO - Version Jetty/5.1.x
12:06:41.342 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
12:06:41.343 INFO - Started HttpContext[/selenium-server,/selenium-server]
12:06:41.343 INFO - Started HttpContext[/,/]
12:06:41.371 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@b113622
12:06:41.372 INFO - Started HttpContext[/wd,/wd]
12:06:41.379 INFO - Started SocketListener on 0.0.0.0:4444
12:06:41.379 INFO - Started org.openqa.jetty.jetty.Server@24a4e2e3
jar:file:/Users/test/Downloads/selenium-server-standalone-2.35.0.jar!/customProfileDirCUSTFFCHROME
12:06:41.454 INFO - Preparing Firefox profile...
12:06:42.313 INFO - Launching Firefox...
12:06:42.974 INFO - Checking Resource aliases

Reported by f4lens on 2013-09-27 19:18:19

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

The fix mentioned in #17 will be shipped with 2.36.

Reported by barancev on 2013-09-28 14:36:15

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I have downloaded selenium-server-standalone-2.37.0.jar and still there is issue.
Please find the console output.

Reported by faiyaz_ahmad@tudip.com on 2013-10-21 16:30:49


- _Attachment: [console.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-1759/comment-24/console.txt)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Your issue is a different beust, it is not related to a missing .html extension.

Please raise a new issue and provide a test suite that allows to reproduce the bug.

Reported by barancev on 2013-10-21 17:06:43

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 1222 has been merged into this issue.

Reported by barancev on 2013-10-21 20:07:04

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 4359 has been merged into this issue.

Reported by barancev on 2013-10-21 20:07:37

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am seeing the same issue as in comment #24.  Was any ticket made?

Reported by ray@nara.me on 2013-10-29 15:08:31

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Actually, my issue was that in the test suite, the paths to the test cases were relative.
 I had to make sure the test suite was specified in the command with an absolute path,
and that the location of the suite was correct relative to the test cases defined in
the suite. Absolute paths in the test suite  for the cases might work too... 

Reported by ray@nara.me on 2013-10-29 15:18:55

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am seeing the same issue as in comment #24. when will this issue be resolved? 

Reported by dinglingle on 2013-11-18 13:58:44

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

No repro => no answer :)

Reported by barancev on 2013-11-18 14:28:29

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hello...

Potentially solved this issue, or at least can give some flash points.

I was experiencing the same issues... and initially thought it was down to the test
teams naming the files with spaces, and chars like & (so rationalised this).

Now the structure I was operating was (via SVN)

SELENIUM
  SUITES
    Suite.html
  TESTS
    TestCase1.html
    TestCase2.html

To resolve the situation I:

1. Moved them to be on the same level (Suite.html and Testcases in same folder)
2. Added some waits in TestCase1... It appears test case1 was loading something that
Testcase2...3 etc relied on to carry on (potentially causing big hold up)

Seems to now be executing fine, executing headless via Jenkins.

Reported by r.cox@bookinglive.com on 2014-04-03 15:02:01

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Also #22 - This issue is down to a problem with your SUITE or TEST CASE naming and pathing.

I.e.

1. In your suite you reference "../mytestcase.html" (up a dir) rather than "./mytestcase.html"
(current dir folder)

2. The naming of your tests are weird, and contain chars in either the test case file
name, or the test suite test case definitions


Reported by r.cox@bookinglive.com on 2014-04-03 15:17:46

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I had this problem because I took a test suite saved from Selenium IDE and just added
the .html extension to the file in Finder. However, I didn't add the .html extension
to the actual saved test cases. I solved the problem by adding the .html to the saved
test cases in the test suite and then updating the test suite html to have the .html
extensions for each test case in the href property:

<tr><td><a href="[test_case_name].html"> 

Reported by nozzywuzhere on 2014-06-18 15:03:51

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 18:12:53

  • Labels added: Restrict-AddIssueComment-Commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant