Javascript Testing in conductor

Jan Provaznik jprovazn at redhat.com
Tue Jul 24 14:43:40 UTC 2012


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.
>
> --
> 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/
>

Hi Tomas,
agree that we should start with something simple.

Do you know what all should be tested, i.e. where we use JS? I know 
about tabs loading, switching filter/pretty views and page autoupdates.
All of this stuff is related to views and to checking page content after 
executing JS so my first thought was that extending current cucumber 
tests would be easier, though I could be wrong about this.

If you think rspec fits better, could you please write and send some 
simple test (for tab loading or autoupdate or view switching)?

Jan



More information about the aeolus-devel mailing list