Chat History with wtanz 08 (#marlena.compton/$c4707bd529e95af4)

Created on 2010-08-22 18:33:29.

2010-08-22

Marlena Compton: 16:33:01
It might just be you and me today.  Are you able to see my messages?
Marlena Compton: 16:42:11
ha!  you're in!
Keis: 16:42:36
restart worked haha
Marlena Compton: 16:42:50
I love restart.  Makes me look like an expert.
Marlena Compton: 16:43:57
I posted the mission this week on my blog, did you get a chance to look it over?
Keis: 16:45:01
yup, i double checked if i could still run watir w/o a hitch on my envt
Marlena Compton: 16:45:41
me too.  I upgraded my os yesterday, so I checked this afternoon.
Marlena Compton: 16:45:53
Have you used Firebug before?
Keis: 16:46:25
yup, i've tried it for inspecting elements
Marlena Compton: 16:46:43
Great, that's exactly how I planned to use it in this session.
Marlena Compton: 16:47:03
Sounds like we're ready to get started.  Have you got any questions?
Keis: 16:48:33
ready to dive in :)
Marlena Compton: 16:48:52
awesome...I'll do the same.
Marlena Compton: 17:08:45
Found the bug I want to write a test for.  I'm having some problems with jssh.  How are you going?
Keis: 17:10:52
Found something that i think is a bug, but it seems a bit trivial
Marlena Compton: 17:11:16
Mine isn't that major either.
Marlena Compton: 17:21:24
Finally got this browser stuff together.
Marlena Compton: 17:21:58
Are you finding screen real estate to be an issue?
Keis: 17:23:35
you refer to having enough space to view the irb console, skype, the browser, other references?
Marlena Compton: 17:23:55
yeah...I'm wishing I had another 2 monitors.
Keis: 17:23:56
or an actual issue with the site? :D
Keis: 17:24:09
ditto.. been alt+tabbing a lot
Keis: 17:44:51
Finally able to have the script produce some readable output...
Keis: 17:45:58
but the bug is really trivial, and i only tried out a few cases.  just enough to make the failed case come out.
Marlena Compton: 17:46:21
I think you've gotten further than I have.
Marlena Compton: 17:46:38
It's about time to swap notes anyway ;)
Marlena Compton: 17:46:46
What was your bug?
Keis: 17:47:55
i noticed that when i dont type in anything in the search box, and perform a search, the search results page is not loaded.  The bug is more of there's no feedback on my search action.
Keis: 17:48:57
<ss type="blush">(blush)</ss> embarrassingly trivial hehe
Keis: 17:49:02
what's your bug?
Marlena Compton: 17:49:24
If you look at the menu for WT Community
Marlena Compton: 17:49:31
There are 2 choices for "profiles"
Marlena Compton: 17:49:41
They go different places.
Marlena Compton: 17:49:53
I think one of them goes to My Profile.
Marlena Compton: 17:50:05
But then there's also a menu selection for "My Profile"
Marlena Compton: 17:50:36
So I'm trying to figure out how to get watir to count the number of buttons within just that menu.
Marlena Compton: 17:50:41
No success yet.
Marlena Compton: 17:50:52
So how did your scripting go?
Keis: 17:51:32
initially, i used firebug to check on the elements for the text box and the search button
Keis: 17:51:43
but after a few tries, i found out, i could just work directly with the url
Marlena Compton: 17:51:57
ahh...
Keis: 17:52:37
so instead of using the text_field.set and button.click... i used the goto function and included the test word in the parameter
Marlena Compton: 17:52:56
Which in this case would be an empty string.
Keis: 17:53:37
it was a bit tedious working with irb and i wanted to not have to repeat typing for each case
Keis: 17:54:03
so i defined a procedure/function, and then came up with scoping problems
Marlena Compton: 17:54:40
Are you familiar with the page object pattern?
Keis: 17:55:07
i'm afraid not... i'm not well read in design patterns
Keis: 17:55:44
still quite a newbie
Marlena Compton: 17:56:07
I think you would find quite a few developers who are not familiar with design patterns either.
Marlena Compton: 17:56:20
Page object is something in Selenium.
Marlena Compton: 17:56:50
It's not that complicated.
Marlena Compton: 17:57:09
It's having methods for stuff like "add user"
Marlena Compton: 17:57:56
Means that if the lower level stuff like classes/button labels change, it doesn't break all of your tests.
Marlena Compton: 17:58:25
It also means that if you have these mehods in place, you can think at a higher level about the tests you are writing.
Marlena Compton: 17:59:26
In your case, having a method called "search" or whatever, it wouldn't matter whether you were using a url or the name of the button to search.
Marlena Compton: 17:59:48
A bit of a long-winded explanation.  Did that make sense?
Keis: 18:01:16
i think i'm getting it... more of, your high level test would just be concerned with the test input/output... and for the lower level stuff, the methods are separate so that your higher level test won't have to change much...
Marlena Compton: 18:01:29
yes
Keis: 18:02:10
e.g., in my case, how the search is done ought to be in another method from the actual test method/function
Keis: 18:02:26
what i did was they're currently in just one method
Marlena Compton: 18:03:42
It's an option.  So if you had a method, "search" would allow you to think more about what you were using as input and less about the architecture of the page underneath.
Marlena Compton: 18:04:06
I thought about it because it sounded like you were playing around with methods which is great.
Keis: 18:04:49
i just realized, my dev friend mentioned something related... about the function doing only what it's supposed to.  In what i did, my "test_search" function did the search and the test for search.  It would have been better to separate those.
Marlena Compton: 18:05:50
It's another way of doing it.  and makes your code a bit more reusable.
Keis: 18:06:10
cool, i get watir, ruby AND refactoring lessons
Marlena Compton: 18:06:22
haha
Marlena Compton: 18:06:29
AND you got further than I did.
Marlena Compton: 18:06:33
GOLD START
Marlena Compton: 18:06:38
oops...meant
Marlena Compton: 18:06:41
GOLD STAR
Marlena Compton: 18:06:45
!!!!!!!
Marlena Compton: 18:06:54
Good job :)
Marlena Compton: 18:07:23
I'm still a bit behind with mine :D
Marlena Compton: 18:07:45
Ajax menus are hard to work with.
Keis: 18:08:21
my example is probably just too simple :D
Keis: 18:08:39
i shared my .rb file (including the mistakes in comments) in http://dl.dropbox.com/u/8700228/watir08.rb
Marlena Compton: 18:09:30
wow...and brave too :)
Marlena Compton: 18:10:20
omg your comment is cracking me up
Keis: 18:10:23
off-topic, i don't know why i used mamamia
Keis: 18:10:50
probably because i want some pasta or italian food :D
Marlena Compton: 18:11:16
I made some marinara last week that was so good!
Marlena Compton: 18:11:31
From one of the recipes on the Writing about testing list.
Marlena Compton: 18:12:13
The other question I wanted to talk about is whether or not this is a good strategy for handing over bugs to develoeprs.
Marlena Compton: 18:12:19
To write a test first.
Marlena Compton: 18:12:47
I see advantages and disadvantages, what do you think?
Keis: 18:13:25
i reckon it's always good to share or work with the dev
Keis: 18:13:56
by sharing the test cases to the dev, he kinda gets a heads-up on what you're expecting
Keis: 18:14:21
downside is, you'd now worry about the dev only handling the test cases you gave out :/
Marlena Compton: 18:15:39
I agree about giving a dev heads up with a test like this.  I think it would also be easier for them to digest than reproduction steps because sometimes those can be subjective.
Marlena Compton: 18:16:22
This does have a learning curve, and I can see it taking more time depending on what phase of development the application is in.
Marlena Compton: 18:16:57
I partly chose this topic cause I wanted some practice for myself.
Keis: 18:18:08
cool choice of topic... it also gave me a chance to try out creating an automated test (not just a recorded one) myself :D
Marlena Compton: 18:18:49
The only thing we both missed is using some type of assert, unless I missed one that you used.
Keis: 18:19:49
i'm not sure... i only used an if text.include check
Marlena Compton: 18:21:13
Looks like watir has a "verify" statement.
Keis: 18:21:31
you're right about the learning curve... it took me some time just for the simple script i made
Marlena Compton: 18:22:41
Yeah, I think it's important to know enough that it doesn't take ages, but it was easier than last time.
Marlena Compton: 18:23:15
Maybe we can get Oliver to show us Cucumber.  That is supposed to make the syntax easier, I think.
Keis: 18:24:39
Hehe yeah, although ruby/watir is already easy to follow... i find it less daunting than java
Marlena Compton: 18:25:41
It seems a little faster than having an ide involved.  We use selenium + java at work.  The syntax doesn't seem that bad, but there's a whole test infrastructure to understand.
Marlena Compton: 18:26:53
I wanted to ask you before we wrap-up if there are any topics you are interested in having us cover in one of these sessions?
Marlena Compton: 18:27:37
I know that Oliver and I usually pick, but since you are so great about attending, thought I would ask what interests you :)
Keis: 18:28:17
i actually like our current track... i.e., working with Watir and possibly Cucumber
Keis: 18:28:28
i was also curious about Selenium RC
Keis: 18:28:47
but i think we've already gone down the Watir path
Marlena Compton: 18:29:03
Actually, I think it would be good to compare watir with another framework.
Keis: 18:30:08
i was also curious about getting to try out other bug tracking sites like bugzilla or jira
Keis: 18:30:59
and maybe one of those wiki-driven test case management tools
Marlena Compton: 18:31:25
I like your list :)
Marlena Compton: 18:31:56
I use JIRA every day since, well, I work at Atlassian.  I don't mind having a session on that.
Marlena Compton: 18:32:15
I'm interested in Fitnesse as well.
Marlena Compton: 18:33:16
I know Oliver is interested in Session based testing.