Hi Jason,

are you trying to run the tests against Selenium Grid?? what your selenium
server host is in the TelluriumConfig file. I have not looked at the
connector code for some time now. I know
that 
com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.session()
is thread safe and if you are running the tests using Selenium Grid and the
tests are going to get the selenium sessions from Selenium HUB then it would
be easy to manage the parallel test execution.




Cheers
Haroon

On 16 March 2010 22:08, Jason <[email protected]> wrote:

> hi all,
>
> I'm trying to parallelize our tellurium tests, and am running into
> frequent cases where requests through the connector give me:
>
> Exception : com.thoughtworks.selenium.SeleniumException:
> The_server_localhost_failed_to_respond_with_a_valid_HTTP_response.:
> java.lang.NullPointerException
>        at
>
> org.codehaus.groovy.runtime.callsite.GetEffectivePojoFieldSite.acceptGetProperty(GetEffectivePojoFieldSite.java:
> 43)
>        at
>
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:
> 237)
>        at
>
> org.tellurium.connector.CustomSelenium.getActiveSeleniumSession(CustomSelenium.groovy:
> 76)
>
> Is there anything that needs to be done for the selenium connector to
> be thread-safe?  Does it need synchronizaiton, or are lower levels in
> the stack already synchronized?
>
> My use-case is this:
>
> I have multiple dslContexts, each of which represents a webapp (I have
> 2)  that is being manipulated during a test.  Setup is being done
> through a TestNG listener, which establishes the DslContexts, does
> connectUrl() on them, etc.  Then my testcase begins.
>
> As mentioned, I get frequent SeleniumExceptions when trying to use
> parallel="methods" while executing.
>
> From looking at the code, I see the the connector isn't synchronized,
> nor is the CustomSelenium object.  It also would seem to me that this:
>
>    // Get the active Selenium RC session
>    def CustomSelenium getActiveSeleniumSession(){
>      DefaultSelenium sel =
>
> com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.session()
>      CommandProcessor processor = sel.commandProcessor
>      CustomSelenium csel = new CustomSelenium(processor)
> /*
>      if(this.userExtension != null &&
> this.userExtension.trim().length() > 0){
>        File userExt = new File(this.userExtension);
> //        processor.setExtensionJs(userExt.getAbsolutePath())
>        processor.setExtensionJs(this.userExtension)
>        println "Add user-extensions.js found at given path: " +
> userExt.getAbsolutePath() + " to Command Processor";
>      }
>  */
>      csel.customClass = this.customClass
>      csel.passCommandProcessor(processor)
>
>      return csel
>    }
>
>
> would have to be thread-safe or the csel object returned back may not
> always be correct -- ie: CustomSelenium would have to be protected
> like DefaultSelenium is, right?
>
> thanks!
> Jason
>
> --
> You received this message because you are subscribed to the Google Groups
> "tellurium-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<tellurium-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/tellurium-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to