Monday, March 2, 2009

How does your programmer mind work?

Ok, so if you are an experienced programmer, may be this doesn't apply to you, but you're welcome to share how does your brain work when you are going through some logic. As for me sometimes I can't just seat an type code like I am typing this note like pay attention to my spelling, pause, and type again.

Sometimes I need to write small stories, (per say), so I don't forget what comes next, something like this:
Let's say I want to do something simple as getting an order beloging to a customer and display it using my favorite asp control.
//Get Customer Id
//Load customer object by Id
//Get customer LastName property and assign it to a variable
//Assign a First Name to a variable too
//Load order by customer full name
//Bind the order to a repeater

What is the benefit of doing this? You're kind of following test driving development!
You can use it as a starting point for a unit test.
What do you think? What is your thought process?

Saturday, February 28, 2009

WatiN

I would like to thank the creator of WatiN, (Jeroen van Menen), and all of the contributors, you guys are awesome!!

There is allready a lot of documentation to the WatiN's Home site so if you are looking for a sample to get started go there.
Here is what I did with WatiN this Week.

There is a method in WatiN called CaptureWebPageToFile, which it capturees a screenshot and saves it to a file. But what I wanted to do is capture every page and save it to a word document so at the end of the test, I can go and quickly glanced at the pages to make sure that my website looks right, (i.e no broken images, broken links..etc).



so here's my solution;

//I creadted a new word document app

word = new word.ApplicationClass();

//open a word doc

word.visible = true;

//ceated a temp file to hold an image in C:

//then wala, capture the image with Wating, then insert it into a word doc


_ieBrowser.CaptureWebPageToFile("C:\\Test\\myImages.bmp");
_word.ActiveWindow.Selection.Range.InlineShapes.AddPicture(fileName, ref obj, ref obj, ref obj);

Did you do something similar or is this helpful?

Tools for Web Site Testing

For the last 2-3 years I've been involved with Quality Assurance (QA). I am familiar with a few tools for automation such as Robot, Certify, and ClearQuest. I didn't really spent that much time to learned the ins and outs of ClearQuest, but I did with the others because it was what the company, (where I worked as an intern), used.



After that, I change jobs and at my current company I went open source. I didn't really see the need to pay for a commercial tool. In my own oppinion, and experience there was a huge ammount of time spending to keep up with the learning curve of thesse tools, and they were buggy. So I set our QA Department and spent some time researching some tools for Test Automation and test case management tools. I found Watir and liked it, but soon I found WatiN which I fell in love with, since is writting in C# and is design for .NET architecture it was what I needed.



I will post some things about WatiN in the future hopefully it'll help someone.

But my question is, if you are a QA engineer, what is your recommendation as far as automation and test case management tools is concerned. Oh, I use testLink for test case management.



What are the pros and cons of Open Source vs Commercial?

Take me back!! (Back Button)

This is very simple but sometimes I have to think about it when I do it.
Very often in html forms we have OK, CANCEL, and BACK buttons to go back to a previous page.
So here is my solution to go BACK to a previous page in plain HTML.

(input onclick="history.back();" type="button" value="BACK")


What would be your solution and why this might not be a good solution?

My First Post

So what do you write on a blog? It's probably a common question people asked when they first set up an account. I don't even know if some one will read this blog :(.

I'm doing mostly for myself for several reasons, 1) To improve my writing skills, 2)Improve my language barrier, 3)Keep notes in Software Engineering in general, for future reference for myself.
So welcome to my blog and I hope that you will share your knowledge in the area of your expertise.