Ads

Important Selenium Interview Questions and Answers for Experienced and Freshers

Important Selenium Interview Questions and Answers for Experienced

SOFTWARE TESTING LIFE CYCLE (STLC) 
Software Testing Life Cycle (STLC) defines the steps/ stages/ phases in testing of software.

Nevertheless, Software Testing Life Cycle, in general, comprises of the following phases: Requirements/ Design Review You review the software requirements/ design (Well, if they exist.) 'Review Defect' Reports Curiosity Test Planning Once you have gathered a general idea of what needs to be tested, you 'plan' for the tests.

Test Plan
Test Estimation
Test Schedule
Farsightedness
Test Designing
You design/ detail your tests on the basis of detailed requirements/design of the software (sometimes, on the basis of your imagination).

Test Cases / Test Scripts/Test Data Test Environment 

You setup the test environment (server/ client/ network, etc) with the goal of replicating the end-users' environment.

Test Environment Rich company Test Execution You execute your Test Cases/ Scripts in the Test Environment to see whether they pass.

Test Results (Incremental) Test Reporting You prepare various reports for various stakeholders.

Test Results (Final) Test/ Defect Metrics Test Closure Report Note that the STLC phases mentioned above do not necessarily have to be in the order listed; some phases can sometimes run in parallel (For instance, Test Designing and Test Execution).

Interestingly, no matter how well-defined a Software Testing Life Cycle you have in your project or organization, there are chances that you will invariably witness the following widely-popular cycle: Testing In this type of STLC, you skip phases like design review, test planning, etc in the hope that the skipping will save you some time and/or cost [But, it never does].

Software Development Life Cycle, or Software Development Process, defines the steps/ stages/ phases in the building of software.

Test Build/Deployment Unit Testing Integration 

Testing System Testing Acceptance Testing Test Builds Preparation/Deployment Unit Testing Test Plan Test Cases/Scripts Integration Testing System Testing Acceptance Testing[ Internal Acceptance Test and External Acceptance Test] No matter what, it is essential that you clearly understand the software development life cycle your project is following.

One issue that is widespread in many projects is that software testers are involved much later in the life cycle, due to which they lack visibility and authority (which ultimately compromises software quality).


Software Quality Assurance (SQA)

 is a set of activities for ensuring quality in software engineering processes (that ultimately result in quality in software products).

Testing The quality management system under which the software system is created is normally based on one or more of the following models/standards: Software Quality Assurance encompasses the entire software development life cycle and the goal is to ensure that the development and/or maintenance processes are continuously improved to produce products that meet specifications/requirements.


The process of Software Quality Control (SQC) 

is also governed by Software Quality Assurance (SQA).

The terms 'Verification' and 'Validation' are frequently used in the software testing world but the meaning of these terms are mostly vague and debatable.

The process of evaluating software during or at the end of the development process to determine whether it satisfies specified business requirements.

Evaluation Items Plans, Requirement Specs, Design Specs, Code, Test Cases The actual product/software.

Inspections Testing Software Quality Control (SQC) is a set of activities for ensuring quality in software products.

Test Plan Review
Test Cases Review
Testing Unit
Testing Integration
 Testing System
Testing Acceptance

Testing Software Quality Control is limited to the Review/Testing phases of the Software Development Life Cycle and the goal is to ensure that the products meet specifications/requirements.

The process of Software Quality Control (SQC) is governed by Software Quality Assurance (SQA).

Some people assume that QC means just Testing and fail to consider Reviews; this should be discouraged.

Now what is a TEST Automation Framework ? which when followed during automation scripting produce beneficial outcomes like increase code re-usage , higher portability , reduced script maintenance cost etc.

2)The Test Library Architecture Framework.

3)The Data-Driven Testing Framework.

4)The Keyword-Driven or Table-Driven Testing Framework.

5)The Hybrid Test Automation Framework.

It is the simplest of all Frameworks and also know as "Record & Playback".In this Framework , Tester manually records each step ( Navigation and User Inputs), Inserts Checkpoints ( Validation Steps) in the first round .

Easiest way to learn the features of the Testing Tool Test data is hard coded into the script 2)The Test Library Architecture Framework.

In this Framework , test scripts are initially recorded by "Record & Playback" method.

These Functions are called by main test script called Driver in different ways to create test cases.

Other Function calls / Test Steps.

Technical expertise is necessary to write Scripts using Test Library Framework.

More time is needed to plan and prepare test scripts.

Test Data is hard coded within the scripts 3)The Data-Driven Testing Framework.

In this Framework , while Test case logic resides in Test Scripts, the Test Data is separated and kept outside the Test Scripts.Test Data is read from the external files (Excel Files, Text Files, CSV Files, ODBC Sources, DAO Objects, ADO Objects) and are loaded into the variables inside the Test Script.

Test Scripts themselves are prepared either using Linear Scripting or Test Library Framework.

Ex: Developing the Flight Reservation Login script using this method will involve two steps.

Step 1) Create a Test - Data file which could be Excel , CSV , or any other database source.

Step 2) Develop Test Script and make references to your Test- Data source. ? Changes to the Test Scripts do not affect the Test Data Test Cases can be executed with multiple Sets of Data A Variety of Test Scenarios can be executed by just varying the Test Data in the External Data File More time is needed to plan and prepare both Test Scripts and Test Data 4)The Keyword-Driven or Table-Driven Testing Framework.

The Keyword-Driven or Table-Driven framework requires the development of data tables and keywords, independent of the test automation tool used to execute them .

Tests can be designed with or without the Application.

In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test.

Each row respresents one Test Step.

Once you've created your data table(s), you simply write a program or a set of scripts that reads in each step, executes the step based on the keyword contained the Action field, performs error checking, and logs any relevant information.

If you observe in this case the Keywords Set , Click , Verify remain the same for which corresponding component functions are already developed.

Test Tool Independent 
Independent of Application Under Test, same script works for AUT (with some limitations) Tests can be designed with or without AUT Initial investment being pretty high, the benefits of this can only be realized if the application is considerably big and the test scripts are to be maintained for quite a few years.

NOTE : Even though QTP advertises itself as KeyWord Driven Framework, you can not achieve complete test tool and application idependence using QTP.

5)The Hybrid Test Automation Framework.

This hybrid test automation framework is what most frameworks evolve into over time and multiple projects.

Test Modularity Framework In this framework common task in test script are grouped together as Modules.

Business Process Testing (BPT) This frameworks , breaks up large Business Processes into Components which can re-used multiple times in the same or different test scripts.

Defect life cycle, also known as Bug Life cycle is the journey of a defect cycle, which a defect goes through during its lifetime.

It varies from organization to organization and also from project to project as it is governed by the software testing process and also depends upon the tools used.

Test - The Defect is fixed and ready for testing.

Verified - The Defect that is retested and the test has been verified by QA.

TestNG is a testing framework developed in the lines of JUnit and NUnit, however it introduces some new functionalities that make it more powerful and easier to use.

TestNG is designed to cover all categories of tests unit, functional, end-to-end, integration, etc., and it requires JDK 5 or higher.

This tutorial provides a good understanding on TestNG framework needed to test an enterprise level application to deliver it with robustness and reliability.

This tutorial is designed for software professionals interested in learning the features of TestNG Framework in simple and easy steps and implement it in practice.

As you are going to use TestNG to handle all levels of Java project testing, it will be helpful if you have a prior knowledge of software development and software testing processes.

Testing is the process of checking the functionality of an application to ensure it works as per requirements.Unit testing comes into picture at the developer level where adequate measures are taken to test every single entity (class or method) to ensure the final product meets the requirements.

JUnit has driven developers to understand the usefulness of tests, especially of unit tests, when compared to any other testing framework.

Initially designed to enable unit testing only, now used for all kinds of testing.

Cannot do dependency testing.

Intrusive (forces you to extend classes and name your methods a certain way).

The management of different suites of tests in complex projects can be very tricky.

TestNG is a testing framework inspired from JUnit and NUnit, but introducing some new functionalities that make it more powerful and easier to use.

TestNG is an open source automated testing framework; where NG meansNext Generation.

It is designed to be better than JUnit, especially when testing integrated classes.

Eliminating most of the limitations of the older framework, TestNG gives the developer the ability to write more flexible and powerful tests.

As it heavily borrows from Java Annotations (introduced with JDK 5.0) to define tests, it can also show you how to use this new feature of the Java language in a real production environment.

Supports testing integrated classes (e.g., by default, no need to create a new test class instance for every test method).

Separates compile-time test code from run-time configuration/data info.

Introduces 'test groups'.

Once you have compiled your tests, you can just ask TestNG to run all the "front-end" tests, or "fast", "slow", "database" tests, etc.

Supports Dependent test methods, parallel testing, load testing, and partial failure.

Support for multi threaded testing.

TestNG is a framework for Java, so the very first requirement is to have JDK installed in your machine.

Open the console and execute a java command based on the operating system you have installed on your system.

If you do not have Java, install the Java Software Development Kit (SDK) fromhttp://www.oracle.com/technetwork/java/javase/downloads/index.html.

Step 6: Test TestNG Setup Create a java class file named TestNGSimpleTest atC:\>TestNG_WORKSPACE.

@Test Create an xml file with the name testng.xml in C:\ > TestNG_WORKSPACE to execute Test case(s).

Total tests run: 1, Failures: 0, Skips: 0 TestNG - Writing Tests Writing a test in TestNG basically involves the following steps: Write the business logic of your test and insert TestNG annotations in your code.

Add the information about your test (e.g.

the class name, the groups you wish to run, etc.) in a testng.xml file or in build.xml.

Here, we will see one complete example of TestNG testing using POJO class, Business logic class and a test xml, which will be run by TestNG.

Now, let's create a TestNG class called TestEmployeeDetails.java inC:\>TestNG_WORKSPACE.

A TestNG class is a Java class that contains at least one TestNG annotation.

This class contains test cases to be tested.

A TestNG test can be configured by @BeforeXXX and @AfterXXX annotations (we will see this in the chapter TestNG - Execution Procedure), which allows to perform some Java logic before and after a certain point.

@Test // Test to check yearly salary @Test TestEmployeeDetails class is used for testing the methods ofEmpBusinessLogic class.

Tests the yearly salary of the employee.

Tests the appraisal amount of the employee.

Before you can run the tests, you must configure TestNG using a special XML file, conventionally named testng.xml.

It can contain one or more tests and is defined by the tag.

Tag represents one test and can contain one or more TestNG classes.

tag represents a TestNG class.

It is a Java class that contains at least one TestNG annotation.

It can contain one or more test methods.

Compile the Test case classes using javac.

If all has been done correctly, you should see the results of your tests in the console.

The traditional way to indicate test methods in JUnit 3 is by prefixing their names with test.

This is a very effective method for tagging certain methods in a class as having a special meaning, but the naming doesn't scale very well (what if we want to add more tags for different frameworks?) and is rather inflexible (what if we want to pass additional parameters to the testing framework?).

Annotations were formally added to the Java language in JDK 5, and TestNG made the choice to use annotations to annotate test classes.

@BeforeSuite The annotated method will be run only once before all tests in this suite have run.

@AfterSuite The annotated method will be run only once after all tests in this suite have run.

@BeforeClass The annotated method will be run only once before the first test method in the current class is invoked.

@AfterClass The annotated method will be run only once after all the test methods in the current class have run.

@BeforeTest The annotated method will be run before any test method belonging to the classes inside the tag is run.

@AfterTest The annotated method will be run after all the test methods belonging to the classes inside the tag have run.

This method is guaranteed to run shortly before the first test method that belongs to any of these groups is invoked.

This method is guaranteed to run shortly after the last test method that belongs to any of these groups is invoked.

@BeforeMethod The annotated method will be run before each test method.

@AfterMethod The annotated method will be run after each test method.

@DataProvider Marks a method as supplying data for a test method.

The annotated method must return an Object[ ][ ], where each Object[ ] can be assigned the parameter list of the test method.

The @Test method that wants to receive data from this DataProvider needs to use a dataProvider name equals to the name of this annotation.

@Factory Marks a method as a factory that returns objects that will be used by TestNG as Test classes.

@Listeners Defines listeners on a test class.

@Parameters Describes how to pass parameters to a @Test method.

@Test Marks a class or a method as a part of the test.

TestNG identifies the methods it is interested in, by looking up annotations.

Test classes no longer need to extend anything (such as TestCase, for JUnit 3).

This chapter explains the execution procedure of methods in TestNG.

Here is the execution procedure of the TestNG test API methods with an example.

Create a java class file name TestngAnnotation.java inC:\>TestNG_WORKSPACE to test annotations.

// test case 1 @Test System.out.println("in test case 1"); // test case 2 @Test System.out.println("in test case 2"); Next, let's create the file testng.xml in C:\>TestNG_WORKSPACE to execute annotations.


Compile the Test case class using javac.


Now, run the testng.xml, which will run the test case defined in the provided Test Case class.

in test case 1 in test case 2 Total tests run: 2, Failures: 0, Skips: 0 beforeMethod() method executes for each test case but before executing the test case.

afterMethod() method executes for each test case but after executing the test case.

In between beforeMethod() and afterMethod(), each test case executes.

@Test After performing above steps, it will generate a compiled file with the same file name with a .exe extension.

Now pass this file to the test script.

It provides the complete structure with naming conventions which is easy to locate and execute tests.

Step 1: First create a Java project.

Step 3: Create a class with name 'GoogleSearchTest'.

Now let us see how we can convert java project to maven project using below steps: - In the next tutorial we will create a Test using'Selenium Webdriver, Maven, Java and TestNG.

Testing your website with multiple combinations of browsers is known as Cross Browser testing.

Your designer should be testing to make sure that your site works well in all modern browsers.

But as a tester we need to make sure that functionality should at least tested on Internet Explorer, Firefox, Safari & Google Chrome browser.

Multi Browser Testing using Selenium TestNG In every project it is required to perform multi-browser testing to make sure that the functionality is working as expected with every browser to give equal user experience to all of the wide range of audience.

It takes a considerable time to test everything on every browser and when we have used automation to reduce the testing efforts then why don't we perform the multi-browser testing using automation.

TestNG gives us functionality to perform same test on different browsers in a simple and easy way.

1)Create your Script to test a LogIn application using TestNG class.

2) Pass 'Browser Type' as parameters using TestNG annotations to the before method of the TestNG class.

// Once Before method is completed, Test method will start @Test public void login() throws InterruptedException { 3) Create a TestNG XML for running your test.

to tell which browser should be used for Running the Test.

Run the test by right click on the testng.xml file and select Run As >TestNG Suite.

Note: TestNg will execute the test one by one.

You may like to perform parallel tests, next topic will cover that.

Parallel Tests using TestNG This time all we want is to execute test in both browsers simultaneously.

Now just set the 'parallel' attribute to 'tests' in the above used xml and give a run again.

This time you will notice that your both browsers will open almost simultaneously and your test will run in parallel.

Note: You may see some intermittent issues using parallel testing.

Bugzilla is an open source Defect or Bug Tracking System.

Defect Tracking Systems allow individual or groups of developers to keep track of outstanding bugs in their product effectively.

Bugzilla helps track bugs and code changes; communicate with teammates; submit and review patches; manage quality assurance (QA).

15 Most Popular Bug Tracking Software to Ease Your Defect Management Process Posted In | Bug Defect tracking, Software Testing Tools | Last Updated: "November 3, 2015" While there is no harm in using an excel sheet to record/track and emails to report/alert/communicate as the magnitude of the projects, the number of test cycles, the count of the people involved grows it becomes absolutely important that we need a much stronger mechanism that will make the management of these issues simpler and consistent so we can concentrate harder on actually finding more issues in the AUT than managing the ones already found.

To enable the same, the QA market has seen the emergence of various bug tracking systems or defect management tools over the years.

For a bug tracking software it is essential to have: Storage and retrieval Every entity in a testing process needs to be uniquely identifiable, the same rule applies to bugs too.

So, a bug tracking tool must provide a way to have an ID, which can be used to store, retrieve (search) and organize bug information.

The above mentioned are the features of essence which means these are absolutely necessary for any system that claims to be a bug tracking system.

15 Most Popular Bug Tracking Software Details: Bugzilla has been a leading bug tracking tools widely used by many organizations for quite some time now.

It is a tool that integrates directly with the code development environments thus making it a perfect fit for developers as well.

Also, due to its capability to track any and all kinds of issues, it is not necessarily concentrated to only software development industry and renders itself quite efficiently to help desks, leave management systems etc.

Details: Trac also is not necessarily a specialized bug tracking system and is an issue tracking system.

The issues/incidents in Trac are referred to as 'tickets' and the ticket management system can be used for defect management as well, if you wish to do so.

Details: Redmine is an open source issue tracking system that integrates with SCM (source code management systems) too.

Even though it is not a 'bug tracking' tool it involves working with issues, where issues can be features, tasks, bugs/defects etc.

Details: Well, no list of bug tracking tools will be complete without the HP QC, would it? HP ALM is an end-to-end test management solution with a robust integrated bug tracking mechanism within it.

Details: FogBugz is also a web based bug tracking system that refers to defects as 'cases'.

Details: Clear Quest is a client-server based web application that supports defect management process.

Details: Zoho Bug Tracker is one of the modules in the task management software Zoho Project.

It is an online tool that will let you create Projects, milestone, tasks, bugs, reports, documents and so on.

Details: Though the name sounds like it must be a bug-tracking tool that is not all Bug Genie is.

It is a complete Project management and issue tracking tool which involves defect management to be one of its aspects along with integration with many SCM systems, Project creation and handling features, issue tracking mechanism, integrated wiki and easy to use web interface.

Download: The product is not free when hosted but there is a version available for free trial at: The Bug Genie details.

Details: A web-based defect tracking system that is very simple and has all the features that you will need to manage issues for your project effectively.

Details: BugNET belongs to the "issue management" group of tools quite a good one at that.

It has all the features of creating projects, managing them, creating issues against them and tracking them to completion, search, reports, wiki pages, etc.

Details: eTraxis is also another tracking tool, that can be used to track bugs but again, that is not all.

The best feature of this tool is the flexibility it provides with regards to the creation of custom workflows- in other words, you can choose to define the rules that need to be followed in the process of tracking and progress-ing a certain aspect through its lifecycle stages.

The above 15 are the most widely used bug tracking tools, although you might have noticed that bug-tracking by itself is not the target of many tools.

It helps with creation of issues, assigning, tracking and setting the statuses, SVN and Git integration, file sharing etc.

This issues tracking and project management tool is easy to use for managing tasks, bugs, documentation storage among other things.

The typical features of an issue tracking system are here too.

An Agile centric project and issue management tool.

A developer centric bug tracking system (but a bug tracking system nevertheless) with integration to Git and Subversion, it deals with issues as tickets and has a web based repository browser to inspect changes in files.

Ticket/issue/task whatever you need to track, you have this tool up your alley along with the other tracking systems.

It has all the features necessary to carry out all your Project management and test management activities along with bug tracking.

A simple tool that can be used to manage bugs or just manage to-do lists that have nothing to do with software, this tool can be a good option.

A typical issue tracking system that integrates with various source control systems- check out more information at: BUGtrack details.

This tool fall into the section of ALM tools and provides comprehensive solution for test case creation, execution and defect management of course.

Details: Well, no list of bug tracking tools will be complete without the HP QC, would it? HP ALM is an end-to-end test management solution with a robust integrated bug tracking mechanism within it.

in 2000, but now it is developed as a project of the Apache Software Foundation, and as such is part of a rich community of developers and users.

This tutorial provides you an understanding on SVN system that is needed to maintain the current and historical versions of files such as source code, web pages, and documentations.

This tutorial is designed for software professionals interested in learning the concepts of SVN system in simple and easy steps.

Because using SVN to handle all levels of software projects in your organization, it will be good if you have a working knowledge of software development and software testing processes.

Version Control System (VCS) is a software that helps software developers to work together and maintain a complete history of their work.

Trunk: The trunk is a directory where all the main development happens and is usually checked out by developers to work on the project.

For example, when you release version 5.0, you might want to create a branch so that development of 6.0 features can be kept separate from 5.0 bug-fixes.

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced