[Testing] Selenium webdriver + Minitest + SQLite3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Testing] Selenium webdriver + Minitest + SQLite3

João Bordalo
Hi there,

I have a rails application (version 3.2.22). And now I'm creating functional tests through browser using Selenium Webdriver(for browser interaction) and Minitest (to validate).

Before running my test script (that fills a form and submits), I launch the rails server in order to selenium access the application.

Problem: When the selenium 'clicks' on the submit button, the server raises the following error related to Sqlite:

SQLite3::BusyException: database is locked: commit transaction

I have tried a lot of things that the stack overflow and other articles suggested, however, none has worked so far.

So, do you have any ideia why htis is happening and how to fix this?

Thank You in advance,
João Bordalo

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/64ecf7f7-e9e2-440b-b6da-1b702b5129fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Testing] Selenium webdriver + Minitest + SQLite3

Hassan Schroeder-2
On Tue, Sep 4, 2018 at 8:38 AM, João Bordalo <[hidden email]> wrote:

> Problem: When the selenium 'clicks' on the submit button, the server raises
> the following error related to Sqlite:
>
> SQLite3::BusyException: database is locked: commit transaction

You've confirmed this succeeds when you perform this same operation
manually? I would wonder if Selenium is somehow generating two click
events, but that's a WAG.

Is there a stack trace you can post?


--
Hassan Schroeder ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDxW%2BDzEuyg%3D30AzRbKaMw0MVX_Ja8E0eHr_hahRODhVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Testing] Selenium webdriver + Minitest + SQLite3

João Bordalo
You've confirmed this succeeds when you perform this same operation 
manually? I would wonder if Selenium is somehow generating two click 
events, but that's a WAG. 

I have tried it manually and It works as it is supposed to ( the form is submitted currently to database).

Is there a stack trace you can post?
No, it is the server that raises the error, not the selenium script



Em terça-feira, 4 de setembro de 2018 17:38:06 UTC+1, Hassan Schroeder escreveu:
On Tue, Sep 4, 2018 at 8:38 AM, João Bordalo <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="c1G1HusNBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">bordalo...@...> wrote:

> Problem: When the selenium 'clicks' on the submit button, the server raises
> the following error related to Sqlite:
>
> SQLite3::BusyException: database is locked: commit transaction

You've confirmed this succeeds when you perform this same operation
manually? I would wonder if Selenium is somehow generating two click
events, but that's a WAG.

Is there a stack trace you can post?


--
Hassan Schroeder ------------------------ <a href="javascript:" target="_blank" gdf-obfuscated-mailto="c1G1HusNBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hassan.s...@...
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8f9b633b-b362-40a4-84dd-05fb61b25bb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Testing] Selenium webdriver + Minitest + SQLite3

Hassan Schroeder-2
On Tue, Sep 4, 2018 at 10:05 AM, João Bordalo <[hidden email]> wrote:

> Is there a stack trace you can post?
> No, it is the server that raises the error, not the selenium script

? Where are you seeing the error? If it's server-generated then I'd
expect *something* in the logs, hopefully including a stacktrace.

--
Hassan Schroeder ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDD88qBy6dscqC3pJ-WYb0%3DhPEMdJKfjwjneP3h%2B5ZVPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Testing] Selenium webdriver + Minitest + SQLite3

João Bordalo
Thank you for your attempts.
I noticed that i was trying to read DB on my selenium script while server was trying tu write on the same DB.
Removed those lines and it is working fine.

Em terça-feira, 4 de setembro de 2018 18:22:01 UTC+1, Hassan Schroeder escreveu:
On Tue, Sep 4, 2018 at 10:05 AM, João Bordalo <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ezeSnFAQBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">bordalo...@...> wrote:

> Is there a stack trace you can post?
> No, it is the server that raises the error, not the selenium script

? Where are you seeing the error? If it's server-generated then I'd
expect *something* in the logs, hopefully including a stacktrace.

--
Hassan Schroeder ------------------------ <a href="javascript:" target="_blank" gdf-obfuscated-mailto="ezeSnFAQBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hassan.s...@...
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6e4b3776-7423-46fa-8d11-6e2d70fe35fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.