21 Nov 2011

Well done, all of us

Hi all!

My first blog post ever. Not counting Blipfoto as a blog, though.

I've had really interesting weeks. Trying to complete the Rails web example for the dojos and for our use. Not quite getting it ready enough. Well, luckily there's still few more nights to come. And maybe I will end up squeezing a bit more functionality to the app.

I've learned a lot. Ruby on Rails for starters. And I've never been doing any web front-end development. But I have to say that it's been a blast - coding in the living room some nights. Being really tired at work. And I mean really tired.

Some one tweeted the other day: "Coding for fun... and even learning while doing it!" I know the feeling, but I don't see any news in there - when positive feelings are part of anything we do, we tend to learn. And learn a lot. Thus, coding for fun does lead to learning.

Testing for fun does lead to learning.

A bit of-topic. My mind makes these tricks occasionally.

I really liked the dojo we had. For me it seemed that we concentrated on the most important topics I see - the communication between the developers (note, as developers I mean both testers and programmers) and the business. And you did find many aspects that should be verified. If not in executable specifications, then in exploratory testing. Some examples could be
* player named "; drop tables;"
* player with really long names
* player with some strange characters, like a space bar.

And as what was the best part of the discussion, you did suggest an improvement - what if we'd have a username. Then we would not need to identify two persons with same names from the pictures. Pictures which could both be the default ones.

Hmm, why on earth did that not come into our minds? And also trying to implement features in 'wrong order' - how stupid would that be?

I promised to implement the features myself and to post them to the blog. I did change the feature files to require username - as you suggested us to have. Thanks, it was a good call!

The feature file as I wrote it is as follows:


Feature: Managing players
In order to add, modify and remove players in the system
As a receptionist / person in the back office
I need to be able to add, remove and update player information.
So that Players are never removed, rather set inactive

Scenario: Add a player
When I add a new player
Then the player exists

Scenario: mandatory fields
When I am creating a new player
Then following fields are mandatory
| field |
| first_name |
| last_name |
| username |
# And the user will be informed about the failure

Scenario: Player has a default picture if no picture given
When I add a new player without a specific picture
Then the player uses the default picture

Scenario: upload a picture
When I add a new player and upload a specific picture
Then the player exists
And the player has the picture

@wip
Scenario: Removing a player makes it inactive
Given a player
When I remove the player
Then the player is not seen as active player
But the player exists

@wip
Scenario: Listing players
Given a bunch of players
When I list the players
Then I see all players
And they are in alphabetical order by last name - first name.

@wip
Scenario: Player listing shows picture and name
Given a bunch of players
When I list the players
Then I see a thumbnail of the picture of each player
And their names



All those are currently executed directly on the model/controller using the 'Direct Model Access' that's often used in Rails tests. On Friday we'll see how we can execute some of those using the UI. The scenarios tagged as 'wip' will be executed using Capybara simulated browser - yet another means to make testing faster than using a real browser.

But more about that on Friday.

By the way - I'm missing at least one scenario. What could it be?

As last thought few words about feedback. I kind-of totally forgot to explicitly thank for the presentations last Friday. They were excellent. I mean really excellent. You seemed to really worked a lot to get all the necessary information so that you could answer to the questions your student friends (and I) would be asking. Excellent job!

As what comes to our feedback, I hope that we will make a use of a 'feedback door' in the lectures to get course feedback. The most important factors being 'how beneficial the dojo was - scale from 1-5' and 'open comments / free word'.
And more about that too on Friday.

Interesting day coming. I'm so waiting for it.

No comments:

Post a Comment