Please post your Web Driver questions in official Web Driver forum

Thursday, March 31, 2011

Did you support Selenium Proposal at area51?


There is an effort from SeleniumHQ to migrate selenium user forum from Google Groups to more snazzy and user friendly Stack Exchange. You can find more on this here  
So please go ahead and commit to -  http://area51.stackexchange.com/proposals/4693/selenium

To do so, you need to login to Stack Exchange site using Google/Yahoo id

























Now click on Commit button and



















Fill in a bit of details and yes one more thing is pending yet! You need to confirm your email address only after which your commitment would appear on site.



















 And do pass it on to other Selenium enthusiasts in your contact list.


















Since most you have been wondering about advantages of Stackoverflow site over Google Groups, here are the couple of pointers -

# As soon as you type in Title for question in Stack Exchange site, it
shows related question. This makes it easy to find if such question is
already asked. No such feature with Google Groups.
# Being able to tag your question in Stack Exchange site which is not
possible with Google Groups. This makes searching on such tagged
questions absolutely easy. No similar feature with Google groups.
# Formatting of question(bold, italic, hyperlink etc), distinguishing
code block from rest of the post to make it stand out are excellent
features of Stack Exchange site. Google groups just can not with stand
these.
# You earn reputation for every answers which is marked as right, this
gives you more credibility on site. Again Google Groups lacks this.
# Being able to thumbs up or down a specific question or answer, and
in fact close it eventually if it is off topic for site. No similar
feature on Google Groups.

GMail is so Intelligent :-O

No wonder GMail is used by thousand of users despite hypes of GFail.
Was to send one mail today with an attachment. Though I mentioned about attachment in the message of body but forgot to attach the file and GMail prompted me about missing attachment. It stated that I am talking about attachment but there is no attachment in mail. Wonder how many such intelligent features are hidden in GMail.






Friday, March 25, 2011

Selenium IDE, Selenium 1.0, Selenium 2.0, Selenium RC, Selenium GRID, Web Driver and what not... Part 2

So we have seen, Selenium IDE, Core and RC in part 1 and its time to know a new booster in the offing for Selenium. By now you would have realized that Selenium greatly suffers from its own implementation design. It uses js to drive a page and suffers from js restriction in a browser. WebDriver originated as different web testing library, which tries to employ best possible solution for a automated tests in a browser. WebDriver for Firefox is implemented as Firefox extension, while for IE it makes use of IE's automation control. When facilities offered by Browser are not enough, WebDriver makes use of Operating System offerings. For example to type in file input box. WebDriver and Selenium are being merged to offer best of both API. They can not be exported to WebDriver overnight. How about the test which are already written in Selenium and WebDriver has solution for this also. WebDriver lets you write new test using WebDriver api, while yet supporting existing Selenium test using WebDriverBackedSelenium. for java client driver. WebDriver also supports headless (without head  without browser) execution of tests. Since there would not any browser interaction in this case so these tests would be faster than tests running on actual browser. But do you really want to sacrifice browser for sake of speed of tests ?

And we are still not happy with speed of test. We want to run tests on different browsers and all at the same time. Answer is Selenium GRID. One Selenium RC can also be used to invoke multiple browsers, but it would soon exhaust system resources. Grid works with Hub > Slave concept, where one hub (Selenium RC) controls slaves (more Selenium RCs) for invoking browsers on multiple systems.

At last about Selenium 1.0 and Selenium 2.0, Selenium Remote Control is referred as Selenium 1.0 while Selenium 2.0 is referred as merged Selenium and WebDriver api, which should be future Selenium. You may want to be loyal to Selenium 1.0 before while experimenting with Selenium 2.0 at the same time...

Thursday, March 24, 2011

Selenium IDE, Selenium 1.0, Selenium 2.0, Selenium RC, Selenium GRID, Web Driver and what not... Part 1

Here is my take on nebulous terms (well nebulous for newbie) which are used with Selenium. And what might be your best choice when considering to use Selenium for functional test automation of web applications.

So your client asks for free functional test automation tool and you stumble upon Selenium and first thing you begin to play with is Selenium IDE , Selenium IDE is not so fancy in comparison to QTP IDE or other Automation tools available in market. But then no Test tool IDE is as good as Eclipse, IntelliJ, Visual Studio. (But why to mention them here!) And now you have begun to use Selenium IDE in  firefox browser (Yes you can use it ONLY with firefox) , created tests and test suites and have seen your tests running on Firefox. Then comes the impediments. You realize the need to running your tests with more browsers, parametrize your tests, do DB validation using your tests, integrate your test with CI environment and lot more. You could do a many of these using Selenium IDE plug-ins but solution will not be very maintainable. Primary reason is - Selenium IDE lets you use only one programming language called - Selenese, which follows HTML type syntax. And its language capabilities are extremely limited in comparison to other languages like Java, C# etc.... and then you hear something evil. You hear about Selenium Core

The less time you spend with core the better. Though Core is always available with IDE and RC (What is RC !@#@ft#). Core is js library which should be deployed on same application server where your web application is running (Will you really have liberty to do this?) This is to over come Same Origin Policy which has been biggest imitation while working with Selenium. So you soon realize that you can not use core and need a better option. And then you get to know about Selenium Remote Control (RC).

Selenium Remote Control overcomes two primary drawbacks of Selenium Core -


1. Deployment of core on application server.
2. Same Region Policy (did you click on previous hyperlink for this topic?)
3. Being able to use programming language i.e. java, C#, Python. Perl etc.

So what magic does Selenium RC does. Selenium RC employs a proxy server in middle of your browser and application server. So the browser requests to application server, but before response is directed back to browser Selenium proxy server injects its code and then it is delivered to browsers. Hence browser is fooled in to thinking as if response (original response and code injected by Selenium RC) was all returned by Application Server. And so overcomes the Same Origin Policy. Not only this Selenium RC also let you write tests in a gamut of programming language i.e. - Java, C#, php, python using your favorite IDE i.e. Intellij, Eclipse, Visual Studio etc. There is option to export tests from Selenium IDE in the programming language of your choice. So does Selenium RC solves all the problems. No it does not. Selenium RC is infamous when it comes to dealing with pop up window, file download/upload, drag and drop etc. and What the hack is WebDriver and we have not yet spoken about those mysterious version Selenium 1.0 and Selenium 2.0

Next Blog I would detail about remaining Selenium Terms...


Monday, March 21, 2011

So what did testing certificate yield me

I was being asked to write CSTE since almost commencement of my career. There was one extremely diligent (and I mean it) manager with my previous employer who would always ask us to write CSTE or some other testing certificate.
And I always showed my reluctance towards it. Not because I have any grudge against CSTE (though have extreme grudge against ISTQB) but I have not seen any relation between certificate and testing competency.
I have worked with

  • Exceptional testers without certificate
  • Exceptional testers with certificate
  • Unexceptional testers without  certificate
  • Unexceptional testers with certificate

I could never drew any conclusion between testing competency and certificate.

Back to my manager and I. Soon I confronted a condition. I could get to work on my new assignment only if I wrote QC-9.2, client imposition.
I was darn bored of not having association with any project and decided to write this certificate. Those days it was 9.2, must be 10+ now.
It was hardly any study for 1 week, questions were objective and I easily cleared the exam. And so as anyone else with little brain and time in hand.
So did I get to work for the project? No, project never move beyond pipe line and I was employed in another project working on TestComplete for testing winform application. And yes this time without writing any certification.

Now back to CSTE, we were asked to write CSTE mandatorily. It was as if, more experienced you are more certificates you are ought to have in your profile.
Seeing my past experience I was more reluctant than ever to write any more certificate.
Same diligent manager was promoted as senior manager then associate vice president and then vice president and I still did not write the certificate.

Same manager is not there with my previous employer and I am also working in a new org and yet I am not a certified tester. I am glad that my new job is never going to force me to write any certificate.
And if you have not read this yet then do it first in your leisure time - http://www.satisfice.com/blog/archives/36
I also remember a post on decertifying yourself, though can't Google it now.

Friday, March 11, 2011

TestNG - DependsOnMethod which returns a value

Came across a bizarre scenario while using TestNG of late. I had test with method with a return type and another method being dependent on it. i.e. -

###########################################
public class TestNGTest {
   
    @Test
    public Integer returnsSomething() {
        return new Integer(0);
    }
   
    @Test(dependsOnMethods={"returnsSomething"})
    public void dependentMethod() {
        System.out.println("Hello World");
    }
}
###########################################

This over simple test does not work and throws exception -

###########################################
org.testng.TestNGException:
com.core.tests.TestNGTest.dependentMethod() is depending on nonexistent method com.core.tests.TestNGTest.returnsSomething
###########################################

And I wondered about this exception. Ended up in asking this to Cedric and his response was -

"Methods that return a value are ignored as test methods. Wrap it in a void
method and depend on that void method."

""Because it introduced a lot of false test methods for people using @Test
annotations at the class level."

Was not convinced with his thoughts but think that, any method which returns a value should be marked as data provider and not a test method. This separates data providers from test methods and provides better isolation of what should stay with which test method.

Wednesday, March 9, 2011

Software Testing - What keeps you engaged or disengaged

So were you always determined to be software tester (tester by choice) or happened to be (tester by chance). And none of this is better than other. Tester by chance might be as skilled at software testing as tester by choice.
But the question is what keeps them going, what keeps them engaged in work and some times despite having tested same features time and again. So if you were to list out those pointers what would you say, or better if you had to list what keeps you uninterested (which might be an easy question). So let me list down what might disengage a tester from work -

  1. Project is utter crap. None or least (read as none) value is given to testing team, leaving testing aside.
  2. Testing team is more interested in blaming each other of not finding a defect than adding any value to team.
  3. Your salary is least and you had worst appraisal discussion of your life.
  4. So your team members or members in other team are working on test automation. They are using QTP, Selenium and you... well no chance what so ever. And you think automation will bring you to the level of development team (Could write a blog on this nonsense topic it self)....
  5. Your project manager wants you to test any time and every time. 24/7 testing is the dogma s/he is born with. You are a tester and this makes you liable for testing... forever.
  6. How dare you ask about requirement documents? and how dare you missed that production defect !@#!@#!@#$%#$
  7. So your friend is on extended onsite trip and you, well not even sent for visa stamping till now
  8. You attend all the meetings for project and work, WHERE IS THE TIME FOR TESTING
  9. and 1000 situations you would have faced......... Could you list a few, and those enthusiasts who could list otherwise also....
For me its the team which matters lots over any thing else. Once happened to work on worse project having every possible difficulty but team dedication kept me going every time I was worn out. I wish every tester gets to work with such great team at least once in their life time....

Monday, March 7, 2011

Selenium and Capture Network Traffic

Had heard of it but never tried it my self till today, when a colleague asked about selenium being capable of recording http traffic or not.

Did a little Google and found that Selenium 1.0 has api - "captureNetweokTraffic" in DefaultSelenium class, and then needed to know how to use it. To be able to capture network traffic one should start selenium instance as -

selenium.start("captureNetworkTraffic=true");

and then launch the application usual way. Once you reach a point after which n/w traffic is to be captured then fire following method -


selenium.captureNetworkTraffic("xml");

We can pass - "xml", "plain" or "json" as parameter to this method. Since its return type is String, we can assert presence of any specific request on the response received

Though had some trouble while using captureNetworkTraffic, At times I would encounter Internal Server Error from selenium. Or then expected response string will not be available in String returned by captureNetworkTraffic, Though would always see same available from fire bug. But yet on the whole "captureNetworkTraffic" helped in achieving what I wanted to do.

Saturday, March 5, 2011

Familly Ties - Series Review

My hunger for Comic Sitcoms bumped me on Family Ties. It has total of 7 seasons and was aired between 1982 to 1989. I am very impressed with sound track of series, filled with eternal love.
More inspiring characters for me in the series is been Meredith Baxter-Birney as Elyse Keaton who plays role of responsible mother of three (and later four) and working women. Though she rarely loses her temper, but when she does then Michael Gross as Steven Keaton is with her to console. They two are the ideal couple for many in the series.
Then there is Justine Bateman as Mallory Keaton who is funny in her way of not knowing any thing about money but being hard on shopping. 
Michael J. Fox as Alex P. Keaton is most intellectual person in the series, though he is smug about his abilities especially when none of his sister shows any interest in economics.
Tina Yothers as Jennifer Keaton is one darling from series and reminds me of Vicky from Small Wonder. She is absolutely skilled at letting Alex know about his intelligence being of no value for her (some thing which Mallory could never do despite being elder to Alex)
There have been short appearances of Marc Price as Irwin "Skippy" Handelman in some episodes. He plays a dumb head who keeps drolling over Mallory, and Mallory never gives him any chance to come near her barring one episode when both of them were caught in basement.
And there is new entry in series Brian Bonsall as Andrew Keaton, he is not spoken much in series so far and I can only say that he a cute kid.
I am on 5th season of series and enjoying watching it. My rating for this series in 7/10 and two thumbs up for those who want a comic sitcom along with family values it showers....


Fork me on GitHub