S.
Not sure what tool you use, but the one we roll with (JBehave) has the
notion of "pending" tests, which do not fail the build, so these can
quite happily sit in trunk. They act as a nice marker for work
outstanding as well.
--
Maybe she awoke to see the roommate's boyfriend swinging from the
chandelier wearing a boar's head.
Something which you, I, and everyone else would call "Tuesday", of course.
In cucumber, you can tag the feature with "@wip" which excludes by
default from a normal build. I've used this before and found it quite
useful. I tried only to check in pending tests (with a suitable
comment if possible), not failing tests.
Chris
> On Fri, May 20, 2011 at 9:43 AM, vishy <vishal...@gmail.com> wrote:
>> thanks for the suggestions
>>
>> On May 20, 1:33 pm, Graeme Foster <grae...@gmail.com> wrote:
>>> If you're using a source control system that makes branching fast and easy,
>>> then they just go straight into your feature branch until the feature branch
>>> is ready to be merged back into the mainline, at which point the tests
>>> should all be passing.
>>> --
>>> Graeme Foster
>
>
>
> --
> Maybe she awoke to see the roommate's boyfriend swinging from the
> chandelier wearing a boar's head.
>
> Something which you, I, and everyone else would call "Tuesday", of course.
>
--
Chris Parsons
chr...@rsons.org
http://pa.rsons.org
http://twitter.com/chrismdp
http://linkedin.com/in/chrisparsons
--
Chris Parsons
chr...@rsons.org
http://pa.rsons.org
http://twitter.com/chrismdp
http://linkedin.com/in/chrisparsons
I use these rules, when checking in code:
1. Customer/acceptance tests don't have to pass 100%, because they
describe progress, not correctness.
2. Programmer/micro/unit/design tests must pass 100%, because they
help us avoid making mistakes.
I usually end up separating my tests into three major categories:
1. Customer tests
2. Fast programmer tests
3. Slow programmer tests (system tests, performance tests, and so on)
I build each category separately. In Java terms, they're separate
source folders with separate target folders.
--
J. B. (Joe) Rainsberger :: http://www.jbrains.ca ::
http://blog.thecodewhisperer.com
Diaspar Software Services :: http://www.diasparsoftware.com
Author, JUnit Recipes
2005 Gordon Pask Award for contribution to Agile practice :: Agile
2010: Learn. Practice. Explore.
> Definitely check them in.
>
> We use https://github.com/ttsui/pending in our codebase. This works
> like the @wip that Chris mentions, but has the added bonus of still
> running your test and failing it if it starts passing, reminding you
> to remove the annotation
Yeah, Cucumber does a similar thing if you pass it the --wip switch.
cheers,
Matt
--
Freelance programmer & coach
Founder, http://relishapp.com
+44(0)7974430184 | http://twitter.com/mattwynne
Steve
--
Steve Smith
http://SteveSmithBlog.com/
http://twitter.com/ardalis
I know also in the book there are examples like that, but after have
tried @wip in cucumber I found it most rewarding.
Maybe it's also possible to implement it with @Rules in Junit, I
haven't look at it yet.
Any thoughts?
Uberto
> I'm wondering if a kind of @wip annotation would be useful for Junit as well.
> I don't want to break the green/red circle but let's say you wrote a
> test that cannot possibly work for a while (until you finish you other
> code).
> Now your options are 3 basically: you can put on @ignore on it,
> commenting out the assertions or just delete the test and put it as
> todo on your task list.
>
> I know also in the book there are examples like that, but after have
> tried @wip in cucumber I found it most rewarding.
> Maybe it's also possible to implement it with @Rules in Junit, I
> haven't look at it yet.
>
> Any thoughts?
I've started using the @Ignore tag in order to be able to write my "to
do" list directly in with my tests. I don't mind it, although I prefer
to have my to-dos on paper, where I can more easily throw it away when I
change my mind.
--
J. B. Rainsberger :: http://www.jbrains.ca ::
http://www.thecodewhisperer.com
Anyway the nice part of @wip is that it actually runs your tests and
raise an exception in case they where failing (to remember you to
remove @wip)
I hope they'll include in junit then
Uberto
good point.
S.