 Wednesday, June 21, 2006
Dad sent this over today. Now this is performance Driving!
I mentioned WATIR a while back and I have been using it almost every day for the last month or so. The more I use it the more I like it. WATIR is built around Ruby as I mentioned earlier. So I've been looking into Ruby more and more. I have to say I really like it and am starting to use it for some repeative tasks. For example I have a WATIR test that logs into the applications, hits some links etc. It takes about 40 to 60 seconds to run. Well I decided that I really wanted to have a way to run it multiple times in a row. Well, I decided to write a quick Ruby script to take care of this for me. It took about two minutes to look up the system function, which works almost exactly as it does in PERL, another 5 minutes to code and debug and I was done
i = 0
done = ARGV[0]
testScript = ARGV[1]
if(done == nil) or (testScript == nil)
print "usage: ruby runmore.rb N ScriptName\n\r"
print "N equals number of times test should run\n\r"
print "ScriptName equals the ruby/watir script you want to run"
else
while i < done.to_i do
system("ruby #{testScript}")
i = i + 1
end
end
I'm really beginning to enjoy Ruby it's as readable as VB and as writable as PERL.
Not bad for a interpeted language that doesn't use semicolons 
Happy Coding P.S. yes, I wrote a script to run another script...
Where I work, we have to do load testing of just about everything. However we are a small shop and can't spend our budget on some of the bigger testing products out there. So we use Microsoft Application Test. It's included with VS.NET 2003 and has a recorder that works fairly well. There is one little problem, HTTPS. It doesn't record in that protocol, but it will test in it. What you have to do is to record your test on your local machine (localhost) once the test works you just make some changes to the script.
1. First, change the connection string from
Set oConnection = Test.CreateConnection("localhost", 80, false)
to:
Set oConnection = Test.CreateConnection("localhost", 443, true)
2. For each later request, change the following line in the script
oRequest.HTTPVersion = "HTTP/1.0"
to:
oRequest.HTTPVersion = "HTTP/1.1"
That's it! If you would like to read more about it, here is the link to Microsoft's Knowledge Base Article about it: http://support.microsoft.com/?id=327873
 Tuesday, June 13, 2006
I know I haven't posted alot lately. In part because I still haven't gotten my laptop back, not having it with me makes it hard to write blog post when the thought hits me. So I apologize for that. Lately at work Testing has been a big part of what I've been working on. Of course as a programmer I never want to do the same thing twice, even when testing. So we use NUnit to test the code we write however the user interface has always been a difficult beast to try and test. There were a few things out there, but they basically were HTTP recorders. They recorded your actions at the HTTP level and not at the user/browser level. So I kind of gave up on them and gave in to the fact that I would have to do all my user interface testing manually. I wasn't happy about it, but it was what it was. Well about three weeks ago I was listening to a back epoisode of Hanselminutes and Scott Hanselman was talking about WATIR (Web Application Testing In Ruby). Well Scott isn't one to use tools that don't work, so I gave WATIR a try. It is brilliant. I can't say enough good things about this tool. WATIR basically is a Ruby wrapper around the IE DOM. So you are scripting out what is going on inside the browser. There is the minor issue of having to learn Ruby. Believe me it is a minor issue. The examples and documentation that come with WATIR will have you writing tests in no time. Honestly I think that my first test was written and working in under 10 minutes. What is so nice about WATIR is it seems to use the same pholisiphy as Ruby. David Hienemeier Hansson, puts it really well in the 6/2006 issue of Linux Journal " Ruby is more than anything else, a language for writing beautiful code that makes programmers happy. After writing and running your first WATIR test you will be happy.
 Friday, June 02, 2006
I was reading digg.com this morning and came across an article on wired, " Choose Your Own Adventure Returns". Of course this peaked my interested as I loved the CYOA ( Choose Your Own Adventure) series when I was a kid. I can remember walking down to the Rosemead Library on Del Mar, and checking two or three of them out. It was like checking out ten books because depending on your choices the book could turn out completely different. I guess I wasn't the only one that loved this books as they sold 250,000,000 copies world wide. Well apparently the books are being updated and will be released soon for new the generation to read and love. I can wait to buy a couple of them for the Little Boy to read. Going back to the article one, of the fun things they did to present the information was to make the article, a CYOA. Will not being techincally a difficult thing, I sure appreciated it for nostalgia sake.
 Tuesday, May 30, 2006
Reading Lessons
Tonight after playing catch with the Little Boy (he insisted that we play catch, I didn't fight him on this one, I know when to pick my battles), we did his reading homework. I'm amazed that a kidergartener has reading homework. I don't remember having reading homework when I was in kidergarten, but there we were. It was this little printed book with 21 pages and not more than 10 words on any page, some sentences were as simple as "Mit is mad at Mat" (The names have been changed to protect the innocent). Anyhow the way it works is that I read the word and the Little Boy repeats it and we read the whole book once. Then we read it a second time and I point to the words and he reads them to me. Most of the words in these little books he knows by sight, however was one tonight that he had to sound out. "Mmmmm Aaaaa Tttt, Mat". He turns to me and says "I learned that today". Can I just tell you how my heart swelled with pride over that. We got to a section of the book that called out the two characters names, with an exclaimation point. So I explained to him that an exclaimation point means that you read it louder to show surprise or excitement. To which he replied "I'll make sure to tell my teacher tomorrow, so she can learn it too." I told him that I was pretty sure that she already knew it, but he was free to tell her if he wanted to. I've really enjoyed reading to him over the past years, but not as much as I think I enjoyed him reading to me. The Great Wheeze
Well I am just about over the flu, or whatever it was that had me down for the count. I missed a week of work and from near as I can tell they missed me too. I talked with a vendor the other day and apparently it has been discussed that I was out ill, and that they would know where things stood as soon as I got back. That pretty much took care of my dread that there were going to get rid of me for being sick all the time. Anyhow I am feeling better, but my asthma is still a mess. The strange thing about my asthma being out of control is that my sense of smell is somehow heightened. Now before you get to thinking hey that is cool. Let me tell you it's not, sitting on the train and being about to smell all of the perfume, after shave, shampoo, deordant or lack there of, hand lotion and hair gel that all the people in the car I'm sitting in are wearing is not cool, not in the least. It actually makes me feel bad for our dog, if his nose is 10 times more sensitive than ours, no wonder he sneezes all the time.
 Friday, May 19, 2006
Well this week I've been fairly ill with the flu. However that doesn't keep the Little Boy from wanting to go in the backyard and throw the old horsehide around. Okay, horsehide... how about the old baseball sized Super Soft ball around. After all he is is Five and a regular baseball is just a little too hard. We spend about an hour this evening playing catch. Well, I would throw the ball in to his glove, and he would throw the ball in ways in which defys physics and every once in a while I'd actually catch one. I've been trying to teach the Boy proper techique with his catching and throwing. However a five years old doesn't really care about technique, but what is fun. So twisting around and throwing the ball in a very spastic manner, is the funniest way to do it. However it scare the heck out of me to be ten feet away when he is doing this. He has this wierd Randy Johnson side arm throw that when he can control it, is pretty good, however most the time, even the dog ducks when he throws it. Of all the summers of playing ball with my Brothers and Sister, I never felt the need for a cup, as much as I do when playing catch with the Little Boy. Next week we will work on batting.
© Copyright 2008 Russell A. Kelly
Theme design by Bryan Bell
newtelligence dasBlog 1.8.5223.1  | |  | Page rendered at 11/20/2008 1:32:06 AM (Pacific Standard Time, UTC-08:00)
|
On this page....
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat | | 28 | 29 | 30 | 31 | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | 25 | 26 | 27 | 28 | 29 | 30 | 1 | | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Search
Contact
Navigation
Categories
Blogroll
Sign In
|