November 21, 2011

Advantages of Ruby on Rails


The most successful web applications all have been made in Ruby on Rails. 

As of Example We can take twitter in ROR

The advantages of Ruby on Rails
 Faster development with less hassle.
 High-quality solutions in shorter time.
 Complex projects can be scaled more easily.
 Flexible development process with less documentation.
 It's the most advanced framework for web applications.
Ruby on Rails is a framework that brings everything together. Database abstraction, AJAX, test stack, the MVC pattern, etc.  all can be performed well using ROR. Non-RoR applications start simple but grow to monsters full of bugs over time. In Ruby on Rails, you can keep the same architecture and it works successfully.

On comparing with other languages  Ruby on Rails is very easy... I heard these sentences from my colleague...

November 15, 2011

Think out of the Box.. 8 beautiful HR Questions !!!


I got this question from another website its really interesting. So thats y i am posting here in my blog.
Here are some of the typical HR questions asked to find out if the candidates have "out of box" thinking capability:

Question 1:
"What will you do if I run away with your sister?"
The candidate who was selected answered " I will not get a better match for my sister than you, sir."
My Suggestion:
I response him like "Its great I feel like u r going to give a bright future for our sister. :p"

Question 2:
Interviewer (to a student girl candidate) - What if one morning you woke up & found that you were pregnant ?
I will be very excited and take a day off, to celebrate with my husband. (Normally an unmarried girl will be shocked to hear this, but she managed it well. Why should I think it in the wrong way, she said later when asked.)

My Answer:
I am not a girl so that’s not a problem for me J> But anyway The above answer is very much suitable for the question. I like it..... But I had a doubt in the above query. U can't easily judge that u r pregnant while u woke up. 


Question 3:
Interviewer: He ordered a cup of coffee for the candidate. Coffee arrived and was kept before the candidate, then he asked "What is before you?"
Candidate: Instantly replied "Tea" and got selected.
(You know how and why did he say "TEA" when he knows very well that coffee was kept before him?.
Answer: The question was "What is before you U? (-alphabet). Reply was "TEA" T (- alphabet).


My Suggestion:
I think I can tell it’s “before” word.


Question 4:
Where Lord Rama would have celebrated his "First Diwali"?
People will start thinking of Ayodya, Mithila [Janaki's place], Lanka etc...
But the logic is, Diwali was a celebrated as a mark of Lord Krishna Killing Narakasura. In Dusavataar, Krishnavathaar comes after Raamavathaar.

So, Lord Rama would not have celebrated the Diwali At all!


My Answer:
That’s the real fact so I can’t ignore it. 


Question 5:
You are driving along in your car on a wild, stormy night, it's raining heavily, when suddenly you pass by a bus stop, and you see three people waiting for a bus:
An old lady who looks as if she is about to die.
An old friend who once saved your life.
The perfect partner you have been dreaming about.
Which one would you choose to offer a ride to, knowing very well that there could only be one passenger in your car?
This is a moral/ethical dilemma that was once actually used as part of a job application.
* You could pick up the old lady, because she is going to die, and thus you should save her first; * or you could take the old friend because he once saved your life, and this would be the perfect chance to ! pay him back. *
However, you may never be able to find your perfect mate again...
The candidate who was hired (out of 200 applicants) had no trouble coming up with his answer. Guess what was his answer?
He simply answered:
"I would give the car keys to my Old friend and let him take the lady to the hospital. I would stay behind and wait for the bus with the partner of my dreams."
Sometimes, we gain more if we are able to give up our stubborn thought limitations. Never forget to "Think Outside of the Box."

My Wish:
I like the above answer. So I need to try for the same thinking in future..... planned to search for my dream girl.


Question 6:
The interviewer asked the candidate "This is your last question of the interview. Please tell me the exact position of the center of this table where u have kept your files."
Candidate confidently put one of his finger at some point at the table and said that this was the central point at the table. Interviewer asked "how did you decide that this is the central point of this table?", then he answers quickly that "Sir you are not supposed to ask any more question, as it was the last question as you promised .....


My Answer:
If the interviewer is asking questions with me in improper way then I mention him the answer is 320 degree left and 295 degree wide. We need to confuse the interviewer too. After that only we need to answer him like the above.

Question 7:
How many golf balls can fit in a school bus?


My Answer:
Its 2 Reason: two ‘O’ letter in the school is the hidden secret.


Question 7:

How many piano tuners are there in the entire world?


My Answer:
I answer for the above question its "2456315488" numbers randomly even the interviewer dont know the exact count. Hence I answer like that.

And hence, he was selected as because of his quick-wittedness.

This is what Interviewer expects from the Interviewee. ....

"THINK OUTSIDE OF THE BOX"

Testing The Normal Way is Not Enough

i) Do Not Leave Bugs to QA
While writing unit tests and doing it as early as possible. We all know it’s much cheaper to fix the early bugs found. We should not leave bugs to QA department.

ii) Test at First.
Start testing when you have something to test. Tester should start analyzing and testing the application in the starting stage itself, the better we (the testers) understand the product, the better it will be tested. Ideally, developers and testers should discuss how the entire functionality can be tested what can be left to the unit tests, what should be automated via functionality tests as well as prioritize the regression, load, performance, stress, etc. How it is going to satisfy the customers need

iii) Automating Everything is a Risk Process
A man with a tool is a fool. Tester should think out of the box for testing the application. The automation almost always helps in regression. However, it has its own cost as well, so instead of throwing yourself in test automation immediately, first analyze the test value. Is this a simple and common case you’d like to cover? If so, consider integrating it into the unit tests suite. Or If it is complex try to reduce automation for the test case.

iv) Don’t Forget to Test Manually!
Donot forget to test manually. If u are using any tool for automation may produce unknown defects. Automation test cases will verify only the expected test. Don’t forget your automated tests would most probably catch the bugs they are supposed to catch! After all, the human brain can’t be substituted, or at least that wouldn’t be cheap.
You have some ideas on testing a specific feature more, but there are other coming tasks? Write it and implement in some your application. Or probably you are out of ideas about additional testing of this feature? Take the developer who has worked on that for a couple of minutes, discuss how the feature has been tested so far, look at the related unit tests together and go to the next one if you both agree this is ready to go.

v) Product is Completely Tested! It is not True
100% bug free product is not possible.   Developers may mention this is our product this supposed to work in this functionality; this application needs to do this functionality. After the release of the product, In real time product may not full fill the customers need. At last customer may report the product is bug. Product doesn’t seem to be well tested!

vi) Test Never Ends!
Furthermore, regularly get back to think of improving what you’ve done till now.
Just passing the test cases is not covers the entire application has been tested. If u found any bugs in time it needs to be reported to dev team and its needs to be solved immediately. Bugs need to be reduced every moment. Minor bugs may cause the entire application in danger. Whenever a minor bug is resolved then the product should not cause some other defects.

A good tester is always a good analyzer. - Jegan
Negative thinking is necessary for a good software tester. –Jegan 

Testers Bill of Rights!!!

1. Testers have the right to sample their process inputs, and reject poor quality work (No entry).

2. Testers have the right to unambiguous and clear requirements.

3. Testers have the right to test evolutionary early as the system increments.

4. Testers have the right to integrate their test specifications into the other technical specifications.

5. Testers have the right to be a party to setting the quality levels they will test to.

6. Testers have the right to adequate resources to do their job professionally.

7. Testers have the right to an even workload, and to have a life.

8. Testers have the right to specify the consequences of products that they have not been allowed to test properly.

9. Testers have the right to review any specifications that might impact their work.

10. Testers have the right to focus on testing of agreed quality products, and to send poor work back to the source.

 Testers should send bad work back to the source!!!!!!!!

November 9, 2011

Element locators using Selenium

Element locator tells the element for selecting a particular object.


Element locator type= argument
command
target
value

We get the elements for selenium in HTML language.
While using selenium IDE we can get the auto generated element locator type with the following types:
i) Id or Identifier: @id refers the element of identifiers.
In Selenium, type the argument as id=sampleid


ii) Name: @name refers the element attribute for name
In Selenium, type the argument as name=samplename
    Name and Value is similar we can use both in same manner.
Name/value= samplename/value


iii) Link pattern:  In the HTML if any text is comes under the anchor ‘<a>’ tag then we use the link= textpattern

<a href="url">Link Text</a>
Example: link=Link Text

iv) Xpath Expression: Xpath always starts with //
If a element ID is changing continuously then we can use Xpath in its location for identifying element
For Example: Google new is changing continuously, In this scenario we need to use XPath Expression.
Example:
xpath=//img[@alt='The image alt text']
xpath=//table[@id='table1']//tr[4]/td[2]
xpath=//a[contains(@href,'#id1')]
xpath=//a[contains(@href,'#id1')]/@class
xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td
xpath=//input[@name='name2' and @value='yes']
xpath=//*[text()="right"]

Get the link with the link text
<a href="url">Link Text</a>
-> link=Link Text

Get element with the element text
<a href="url">Link Text</a>
-> //a[text()='Link Text']
Get element with part of the element text
<a href="url">Link Text</a>
-> //a[contains(text(), 'ink Tex')]

Get element with an attribute
<a href="url">Link Text</a>
-> //a[@href='link url']

Get element with two attributes
<input value="”value”/" type="”text”">
-> //input[@type='text' and @value='value']

XPather is a firefox plugin help you to find the xpath.

iv) CSS: CSS locator which helps for assigning the CSS location to select the fields.
You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
css=a[href="#id3"]


Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after).

v) DOM: it is a javascript expression. Finds the element in HTML document object model
locator is always starts with document.
dom=document.images[10]
dom=document.forms['myForm'].myDropdown
*******************************************

1. Direct Reference

Id=MyButton (note in this case, “Id =” is not even required)
Name=Description_Field
Value=ABC XYZ
Link=Contact Us

2. DOM or CSS

3. XPath References

3a. Simple XPath

//div(@class=’MyClass’)
//input[contains(@id, 'myTextField')]

3b. Complex XPath

/html/body/div[1]/div[5]/div/table/tbody/tr/td/p/a[3] (An example bad XPath – it will break as soon as the page layout changes a bit)

4. Click and Mouse Events

Click and ClickAt

MouseDown and MouseDownAt

MouseUp and MouseUpAt

MouseMove and MouseMoveAt

DragDrop (useful for moving slider bars that calls a JavaScript event to change a value when the slider is moved).

 

5. Keyboard and Coordinates