matching without @DomainStep ?

25 views
Skip to first unread message

szczepiq

unread,
Jul 8, 2010, 2:25:03 PM7/8/10
to givwenz...@googlegroups.com
What if GWZ allowed to match without @DomainStep. For example:

Given
  I enter "4" into the calculator
Then
  screen shows ">4.0"

CalculatorSteps {

  public void i_enter_into_the_calculator(int number) { ...

  public void screen_shows(String text) { ...


The downside is that we need to quote arguments. But the bright side is that it is simpler and has less duplication.

Feedback?
Cheers,
Szczepan


Wes & Evie

unread,
Jul 8, 2010, 10:13:25 PM7/8/10
to givwenz...@googlegroups.com
i like this.  after reading some future look where uncle bob mentioned the ability to do a plain text text without annotations and i like this idea.  i think this is a good step and i hope at some time we could get rid of the double quotes, maybe levenshtein distance. 

szczepiq

unread,
Jul 9, 2010, 11:23:46 AM7/9/10
to givwenz...@googlegroups.com
>i hope at some time we could get rid of the double quotes, maybe levenshtein distance.

Potentially. Double quotes are only really necessary for non numeric data, usually Strings. And those look better in quotes anyway :P

Szczepan

Kris

unread,
Jul 9, 2010, 3:05:03 PM7/9/10
to givwenz...@googlegroups.com
Although I'm not a big fan of this idea I'd like to see it working ;).

On the levenstein distance I think you could compute something similar as a levenstein distance but based on words rather than single characters. So the metric would be: how many words you need to add/alter/remove to get from one phrase to another. I'm pretty sure some smart butt already made his PhD on that.

Regards,
Kris

wes

unread,
Jul 9, 2010, 8:12:39 PM7/9/10
to givwenzen_user
the word thing is an interesting idea. i really need to do some
research to see what apis might exists to do this.

On Jul 10, 3:05 am, Kris <kris.karczmarc...@gmail.com> wrote:
> Although I'm not a big fan of this idea I'd like to see it working ;).
>
> On the levenstein distance I think you could compute something similar as a
> levenstein distance but based on words rather than single characters. So the
> metric would be: how many words you need to add/alter/remove to get from one
> phrase to another. I'm pretty sure some smart butt already made his PhD on
> that.
>
> Regards,
> Kris
>
>
>
> On Fri, Jul 9, 2010 at 5:23 PM, szczepiq <szcze...@gmail.com> wrote:
> > >i hope at some time we could get rid of the double quotes, maybe
> > levenshtein distance.
>
> > Potentially. Double quotes are only really necessary for non numeric data,
> > usually Strings. And those look better in quotes anyway :P
>
> > Szczepan
>
> > On Fri, Jul 9, 2010 at 4:13 AM, Wes & Evie <wesande...@gmail.com> wrote:
>
> >> i like this.  after reading some future look where uncle bob mentioned the
> >> ability to do a plain text text without annotations and i like this idea.  i
> >> think this is a good step and i hope at some time we could get rid of the
> >> double quotes, maybe levenshtein distance.
>

szczepiq

unread,
Jul 10, 2010, 6:26:50 AM7/10/10
to givwenz...@googlegroups.com
>the word thing is an interesting idea.

Indeed! And it does not seem to be difficult to implement either.

Me & Kris also thought about ignoring the inside of "quotes" when calculating the similarity. Usually "quotes" are used as string parameters and parameter value will always differ from (.*).

JBehave guys have something related to levenshtein distance: http://jira.codehaus.org/browse/JBEHAVE-247

Cheers,
Szczepan
Reply all
Reply to author
Forward
0 new messages