Re: [shoes] BDD and shoes...
- From:
- Tobias Pfeiffer
- Date:
- 2011-09-19 @ 09:42
Hi Eelco,
unfortunately Shoes is not ready yet for BDD. GUI testing is a really
difficult problem. However Steve started a project called shoes-cucumber
( https://github.com/shoes/shoes-cucumber ) in an attempt to change
this. I'll be working on this. But honestly, we don't really know where
it is going (yet). So yeah BDD/TDDing your way to a Shoes app is kind of
difficult, if not impossible right now (somebody please correct me if
I'm wrong).
You could make a clear seperation between GUI and the underlying
logic/models and at least test those with rspec tests.
Other than this the pragmatic programmers got a book on GUI testing with
Ruby ( http://pragprog.com/book/idgtr/scripted-gui-testing-with-ruby ) I
never read it and it is already 3 years old, so I've no idea of how much
help it is...
I hope I could help you a bit with your question.
Tobi
On 09/19/2011 11:35 AM, Eelco tenHave wrote:
> Hi,
>
> I am sort of skimming the surface of cucumber and Rspec to write a shoes app.
> Any tips?
> As I am following allond the Rspec book with my own shoes.app i am having
> difficulty finding out the correct way to describe code.
> I have this feature...
> -----------------
> Feature: student starts tcm-study
>
> As a tcm-student
> I want to start tcm-study
> So I can study all tcm-subjects
>
> Scenario: start tcm-study
> Given I am not yet studying
> When I start tcm-study
> Then I should see an overview of all study subjects.
> And I should be able to choose a subject.
> -------------------------------
> The given is an empty block so it passes.
> the when is a ruby file called start.rb
> ------
> system('shoes lib\student\Tcmstudy.srb')
> -------------------------
> that passes also.
>
> The then is giving me some trouble...
> How can i test code that is inside a shoes GUI.
>
> what i'd like tcmstudy to do is have 4 windows in an app.
> each with a clickable image that represents 1 of 4 study subjects.
> 4 clickable words would do fine for starters...
>
> I don't see how the regexp block generated by cucumber should be rewritten so it
> "sees"what goes on inside the shoes app
>
> Any tips or pointers to an explanation or website?
>
> With Love
> Eelco