Thursday, August 16, 2012

Selenium Interview Questions..

Q1. What is Selenium?

Ans. Selenium is a set of tools that supports rapid development of test automation scripts for web based applications. Selenium testing tools  provides a rich set of testing functions specifically designed to fulfill needs of testing of a web based application.

Q2. What are the main components of Selenium testing tools? 


Ans. Selenium IDE, Selenium RC and Selenium Grid

Q3. What is Selenium IDE? 


Ans. Selenium IDE is for building Selenium test cases. It operates as a Mozilla Firefox add on and provides an easy to use interface for developing and running individual test cases or entire test suites. Selenium-IDE has a recording feature, which will keep account of user actions as they areperformed and store them as a reusable script to play back.


 Q4. What is the use of context menu in Selenium IDE? 


Ans. It allows the user to pick from a list of assertions and verifications for the selected location.


 Q5. Can tests recorded using Selenium IDE be run in other browsers? 


Ans. Yes. Although Selenium IDE is a Firefox add on, however, tests created in it can also be run in other browsers by using Selenium RC (Selenium Remote Control) and specifying the name of the test suite in command line.


 Q6. What are the advantage and features of Selenium IDE?


Ans. 1. Intelligent field selection will use IDs, names, or XPath as needed 


2. It is a record & playback tool and the script format can be written in various languages including.

C#, Java, PERL, Python, PHP, HTML 

3. Auto complete for all common Selenium commands 


4. Debug and set breakpoints 


5. Option to automatically assert the title of every page 


6. Support for Selenium user-extensions.js file


 Q7. What are the disadvantage of Selenium IDE tool? 


Ans. 1. Selenium IDE tool can only be used in Mozilla Firefox browser. 
          2. It is not playing multiple windows when we record it.


 Q8. What is Selenium RC (Remote Control)? 


Ans. Selenium RC allows the test automation expert to use a programming language for maximum flexibility and extensibility in developing test logic. For example, if the application under test returns a result set and the automated test program needs to run tests on each element in the result set, the iteration / loop support of programming language’s can be used to iterate through the result set, calling Selenium commands to run tests on each item. Selenium RC provides an API and library for each of its supported languages. This ability to use Selenium RC with a high level programming language to develop test cases also allows the automated testing to be integrated with the project’s automated build environment.


 Q9. What is Selenium Grid?


Ans. Selenium Grid in the selenium testing suit allows the Selenium RC solution to scale for test suites that must be run in multiple environments. Selenium Grid can be used to run multiple instances of Selenium RC on various operating system and browser configurations.


 Q10. How Selenium Grid works?


Ans. Selenium Grid sent the tests to the hub. Then tests are redirected to an available Selenium RC, which launch the browser and run the test. Thus, it allows for running tests in parallel with the entire test suite.


 Q 11. What you say about the flexibility of Selenium test suite? 


Ans. Selenium testing suite is highly flexible. There are multiple ways to add functionality to Selenium framework to customize test automation. As compared to other test automation tools, it is Selenium’s strongest characteristic. Selenium Remote Control support for multiple programming and scripting languages allows the test automation engineer to build any logic they need into their automated testing and to use a preferred programming or scripting language of one’s choice.Also, the Selenium testing suite is an open source project where code can be modified and enhancements can be submitted for contribution. 


Q12. What test can Selenium do? 


Ans. Selenium is basically used for the functional testing of web based applications. It can be used for testing in the continuous integration environment. It is also useful for agile testing. 


Q13. What is the cost of Selenium test suite? 


Ans. Selenium test suite a set of open source software tool, it is free of cost.


 Q14. What browsers are supported by Selenium Remote Control? 


Ans. The test automation expert can use Firefox, IE 7/8, Safari and Opera browsers to run tests in Selenium Remote Control. 


Q15. What programming languages can you use in Selenium RC? 


Ans. C#, Java, Perl, PHP, Python, Ruby
 Q16. What are the advantages and disadvantages of using Selenium as testing tool? 



Ans. Advantages: Free, Simple and powerful DOM (document object model) level testing, can be used for continuous integration; great fit with Agile projects. Disadvantages: Tricky setup; dreary errors diagnosis; can not test client server applications.


 Q17. What is difference between QTP and Selenium? 



Ans. Only web applications can be testing using Selenium testing suite. However, QTP can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer, Firefox, Safari, Opera or Konqueror on Windows, Mac OS X and Linux. However, QTP is limited toInternet Explorer on Windows.


QTP uses scripting language implemented on top of VB Script. However, Selenium test suite has theflexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.


 Q18. What is difference between Borland Silk test and Selenium?


 Ans. Selenium is completely free test automation tool, while Silk Test is not. Only web applications can be testing using Selenium testing suite. However, Silk Test can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer, Firefox, Safari, Opera or Konqueror on Windows, Mac OS X and Linux. However, Silk Test is limited to Internet Explorer and Firefox.

Sunday, June 5, 2011

Some Important Testing Terms.

Smoke and Sanity Testing

This tutorial explains with a real world scenario, what Sanity/Smoke Testing is, & why it is important.
• Consider a scenario, when after fixing defects of integration testing , the system is made available to the testing team for system testing
• You look at the initial screen , system looks fine and delay system test execution for the next day since you have other critical testing requirements to attend to
• To avoid such situation sanity also know SMOKE testing is done to check critical functionalities of the system before its is accepted for major testing. Sanity testing is quick and is non- exhaustive. Goal is not to find defects but to check system health

Non Functional Testing

• Apart from Functional testing, non – functional requirements like performance, usability, and load factor are also important.
• Performance testing is carried out to check & fine tune system response times. The goal of performance testing is to reduce response time to an acceptable level
• That’s all to Types of Testing

There are three testing types

1) Functional
2) Non – Functional
3) Maintenance.

Web Application Testing.

What is Web Testing?

Web Testing in simple terms is checking your web application for potential bugs before it’s made live or before code is moved into

Web Application Testing Checklist:

Some or all of the following testing types may be performed depending on your web testing requirements.

1. Functionality Testing:

This is used to check of your product is as per the specifications you intended for it as well as the functional requirements you charted out for it in your developmental documentation.
Test all links in your WebPages are working correctly and make sure there are no broken links. Links to be checked will include -
• Outgoing links
• Internal links
• Anchor Links
• Mailto Links

Test Forms are working as expected. This will include-

• Scripting checks on the form are working as expected. For example- if a user does not fill a mandatory field in a form an error message is shown.
• Check default values are being populated
• Once submitted , the data in the forms is submitted to a live database or is linked to an working email address
• Forms are optimally formatted for better readability

Test Cookies are working as expected. Cookies are small files used by websites to primarily remember active user sessions so you do not to log in every time you visit a website. Cookie Testing will include
• Testing cookies (sessions) are deleted either when cache is cleared or when they reach their expiry.
• Delete cookies (sessions) and test that login credentials are asked for when you next visit the site.

Test HTML and CSS to ensure that search engines can crawl your site easily. This will include

• Checking for Syntax Errors
• Readable Color Schemas
• Standard Compliance. Ensure standards such W3C, IETF, ISO, ECMA, or WS-I are followed.
Test business workflow- This will include
• Testing your end - to - end workflow/ business scenarios which takes the user through a series of webpage's to complete.
• Test negative scenarios as well , such that when a user executes an unexpected step , appropriate error message or help is shown in your web application.
Tools that can be used: QTP , IBM Rational, Selenium

2. Usability testing:

Usability testing has now become a vital part of any web based project. It can carry out by testers like you or a small focus group similar to the target audience of the web application.
Test the site Navigation:
• Menus , buttons or Links to different pages on your site should be easily visible and consistent on all WebPages
Test the Content:
• Content should be legible with no spelling or grammatical errors.
• Images if present should contain and "alt" text

3.Interface Testing:

Three areas to be tested here are - Application, Web and Database Server
• Application: Test requests are sent correctly to the Database and output at the client side is displayed correctly. Errors if any must be caught by the application and must be only shown to the administrator and not the end user.

• Web Server: Test Web server is handling all application requests without any service denial.

• Database Server: Make sure queries sent to the database give expected results.
Test system response when connection between the three layers (Application, Web and Database) can not be established and appropriate message is shown to the end user.

4.Database Testing:

Database is one critical component of your web application and stress must be laid to test it thoroughly. Testing activities will include-
• Test if any errors are shown while executing queries
• Data Integrity is maintained while creating, updating or deleting data in database.
• Check response time of queries and fine tune them if necessary.
• Test data retrieved from your database is shown accurately in your web application

5. Compatibility testing.

Compatibility tests ensure that your web application displays correctly across different devices. This would include-
Browser Compatibility Test: Same website in different browsers will display differently. You need to test if your web application is being displayed correctly across browsers, JavaScript, AJAX and authentication is working fine. You may also check for Mobile Browser Compatibility. The rendering of web elements like buttons, text fields etc changes with change in Operating System. Make sure your website works fine for various combination of Operating systems such as Windows, Linux, Mac and Browsers such as Fire fox, Internet Explorer, Safari etc.

6.Performance Testing:

This will ensure your site works under all loads. Testing activities will include but not limited to -
• Website application response times at different connection speeds
• Load test your web application to determine its behavior under normal and peak loads
• Stress test your web site to determine its break point when pushed to beyond normal loads at peak time.
• Test if a crash occurs due to peak load , how does the site recover from such an event
• Make sure optimization techniques like gzip compression , browser and server side cache enabled to reduce load times
Tools that can be used: Loadrunner, JMeter

7. Security testing:

Security testing is vital for e-commerce website that store sensitive customer information like credit cards. Testing Activities will include-
• Test unauthorized access to secure pages should not be permitted
• Restricted files should not be downloadable without appropriate access
• Check sessions are automatically killed after prolonged user inactivity
• On use of SSL certificates, website should re-direct to encrypted SSL pages.

Tools that can be used: Babel Enterprise, BFBTester and CROSS

8. Crowd Testing:

You will select a large number of people (crowd) to execute tests which otherwise would have been executed a select group of people in the company. Crowd sourced testing is an interesting and upcoming concept and helps unravel many a unnoticed defects.