Javascript Testing in conductor

Imre Farkas ifarkas at redhat.com
Mon Jul 16 09:27:38 UTC 2012


On 07/16/2012 10:39 AM, Garik Khachikyan wrote:
> On 16/07/12 10:35, Imre Farkas wrote:
>> On 07/16/2012 03:06 AM, Tomáš Hrčka wrote:
>>> Hi all,
>>>
>>> i was investigating options we have for $SUB, here is short summary to
>>> start discussion about this topic.
>>>
>>> As for any other language there are unit testing frameworks[1] also for
>>> JS. Comparison of them can be found all around the internet [2][3].
>>> I am not sure if this is the way we want to go right now since there is
>>> not so much logic on the client side of conductor.
>>>
>>> Another option is to use testing frameworks we currently use for testing
>>> ruby code with some extension to interpret JS.
>>> In current stage ie. almost no JS tested at all. We can choose between
>>> Rspec request specs[4][5] or Cucumber scenarios and two plugins to
>>> interpret js capybara-webkit[6] and the selenium-webdriver[7]. I would
>>> prefer combination of rspec and capybara for its speed and simplicity
>>> when writing/reading tests.
>>
>> Most of the javascript code are for auto-updating various pages, so if
>> we want to test it with some webdriver and interpret the respone, we
>> have to load the original page and then wait 30 secs, which would
>> terribly slow down our test suite. How can we avoid this?
>>
>> Imre
> waitForElementPresent ?
>
> if it would not exists on your programming language chosen, you can
> simply write that function waiting in a loop for: isElementPresent (or
> similar).
>
> /me inspired from java.
>
> Garik.

It's not the question of method call, I'm pretty sure there is something 
similar in any of the above mentioned lib. It's the question of the time 
our test suite is running. If we have to wait more 30+ secs for one 
single js test case, it would really slow down our test suite as a whole.

Imre

>>
>>>
>>> --
>>> Tomas
>>>
>>> 1 -
>>> http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#JavaScript
>>> 2 -
>>> http://testdrivenwebsites.com/2010/04/19/java-script-xunit-style-frameworks-comparison/
>>>
>>> 3 -
>>> http://stackoverflow.com/questions/300855/looking-for-a-better-javascript-unit-test-tool
>>>
>>> 4 - http://epimetrics.com/entries/3129
>>> 5 -
>>> https://www.relishapp.com/rspec/rspec-rails/v/2-9/docs/request-specs/request-spec
>>>
>>> 6 - https://github.com/thoughtbot/capybara-webkit
>>> 7 - http://seleniumhq.org/projects/webdriver/
>>>
>>
>>
>
>





More information about the aeolus-devel mailing list