[katello-devel] Katello - request: add webrat to support rspec tests

Brad Buckingham bbuckingham at redhat.com
Mon Jul 25 13:03:26 UTC 2011


On 07/25/2011 07:58 AM, Lukas Zapletal wrote:
> On 07/23/2011 06:23 PM, Brad Buckingham wrote:
>> I'd really like to add it.  Would anyone be opposed to it?
>
> I like it very much. Just few ideas:
>
> How it play with AJAX? Because we have many portions of the UI in 
> JavaScript. I guess it does not simulate full browser environment, 
> thus more effort could be required to test it. This *could* be 
> advantage of Selinium and similar tools.
>
> I am also not sure if your intention is to use it in our unit test 
> suite, but "click on link, check if page has 'ok' text" is definitely 
> not a unit test. This is rather integration test. We should use them 
> only for triggering simple examples (units), but not as whole scenarios.
>
> And ... is this aligned with QA plans? I mean there are some 
> katello-gui hudson jobs. I am not sure what they do (sent a list 
> already).
>
> I am big fan of those "agile" testing frameworks. I interpret them as 
> more important than "agile" development frameworks.
>
Hi Lukas,

My intention was to add webrat in to the development environment so that 
we can leverage the matchers that it provides (e.g. have_selector).  
Today, we lack view specs; however, we are beginning to add them.  In 
doing so, I have found that the RAILS assert_select is not sufficient.  
In addition, rspec has removed it's support for have_tag, as they appear 
to assume that folks will pull likely pull in Webrat, Capybara or other 
to provide additional matchers.

With this request, I was not looking to fully emulate the browser and I 
don't think we have intentions to begin writing Selenium tests as part 
of development.  That said, qunit was recently introduced to support 
unit testing of the javascript portions of the UI.

thanks,
Brad




More information about the katello-devel mailing list