Help with BDD code

43 views
Skip to first unread message

valm...@gmail.com

unread,
May 7, 2013, 9:58:39 AM5/7/13
to seleniu...@googlegroups.com
BDD has just been introduced at my work place and I am also new to BDD.

        Can anyone help me refactor the following Feature file to be the more efficient and cleaner.  

Feature:

As a user
I want to be able to upload images
In order to see them on the website

Given that I have selected images that are JPG, PNG or GIF
And they are in an FTP folder
When I go to the asset uploader page
And select the FTP folder by clicking on the field called source and entering text
And select the destination folder by the same method
And press the button labelled upload
Then I see a progress bar
And when the progress bar is complete
Then I see the images are uploaded in the correct folder on my website.
And when I click on an image it opens in my browser successfully.

Any advice will be appreciated

Jon Valvano

unread,
May 7, 2013, 10:18:42 AM5/7/13
to seleniu...@googlegroups.com
This really does seem like a topic for this email list. (I am sure someone will post a solution.)

I would suggest finding an email list based on the BDD framework you are using(cucumber?) and start there.

Best of luck to you!!!!




--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/CXiQKI2L7jQJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jon Valvano

unread,
May 7, 2013, 10:56:15 AM5/7/13
to seleniu...@googlegroups.com
This really does *not* seem like a topic for this email list. (I am sure someone will post a solution.)

-sorry-

Oscar Rieken

unread,
May 7, 2013, 1:56:48 PM5/7/13
to seleniu...@googlegroups.com
I was curious my team uses BDDish style of doing things so i asked them all to refactor your feature. and here are the examples we came up with



I must agree this question is outside of this group, and I would suggest reaching out to the cucumber group and perhaps reading the cucumber book


On Tue, May 7, 2013 at 9:58 AM, <valm...@gmail.com> wrote:

--

David Lai

unread,
May 7, 2013, 5:16:22 PM5/7/13
to seleniu...@googlegroups.com
Lookup cucumber or lettuce frameworks.  They're a good way of implementing a BDD test.  One advice they dont' cover in those framework documentation is you should create a 'Flow' level abstraction to avoid turning your sentences into some sort of pseudo code.  It's more important that sentences reflect the actual requirement than being reusable.  That's where the Flow level abstraction comes in.  You can have your fixtures call the Flow level objects and reuse them at that level.

valm...@gmail.com

unread,
May 29, 2013, 5:36:57 PM5/29/13
to seleniu...@googlegroups.com
Hi Oscar, I really appreciate the effort you went through to have my BBD code refactored.
The refactored code has been put into good use.
Thank you very much.
Reply all
Reply to author
Forward
0 new messages