Most Frequently Asked Interview Questions" - Manual Testing


Q. What is a Defect?
Ans. Any flaw imperfection in a software work product.
(or)
Expected result is not matching with the application actual result.

Q. What is Severity?
Ans. It defines the important of defect with respect to functional point of view i.e. how critical is defect  with respective to the application.

Q. What is Priority?
Ans. It indicates the importance or urgency of fixing a defect

Q. What is Re-Testing?
Ans. Retesting the application to verify whether defects have been fixed or not.

Q. What is Regression Testing?
Ans. Verifying existing functional and non functional area after making changes to the part of the software or addition of new features.

Q. What is Recovery Testing?
Ans. Checking if the system is able to handle some unexpected unpredictable situations is called recovery testing.

Q. What is End-to-End Testing?
Ans. Testing the overall functionality of the system  including the data integration among all the modules is called end to end testing.

Q. What is Exploratory Testing?
Ans. Exploring the application, understanding the functionality, adding (or) modifying existing test cases for better testing is called exploratory testing.

Q.What is functionality Testing
Ans. Functionality testing is performed to verify that a software application performs and functions correctly according to design specifications.

Q. What is Non-functionality Testing?
Ans. Validating various non functional aspects of the system such as user interfaces, user friendliness security, compatibility, Load, Stress and Performance etc is called non functional testing.
 

10 Most Frequently Asked Interview Questions

I have got many request for the manual testing interview questions. So, here are some of the interview questions which you would like to know about.


Q1. What is a test plan?

A: A software project test plan is a document that describes the objectives, scope, approach and focus of a software testing effort. The process of preparing a test plan is a useful way to think through the efforts needed to validate the acceptability of a software product. The completed document will help people outside the test group understand the why and how of product validation. It should be thorough enough to be useful, but not so thorough that none outside the test group will be able to read it.

Q2. What is configuration management?

A: Configuration management (CM) covers the tools and processes used to control, coordinate and track code, requirements, documentation, problems, change requests, designs, tools, compilers, libraries, patches, changes made to them and who makes the changes. Rob Davis has had experience with a full range of CM tools and concepts. Rob Davis can easily adapt to your software tool and process needs.

Q3. What if the software is so buggy it can't be tested at all?

A: In this situation the best bet is to have test engineers go through the process of reporting whatever bugs or problems initially show up, with the focus being on critical bugs. Since this type of problem can severely affect schedules and indicates deeper problems in the software development process, such as insufficient unit testing, insufficient integration testing, poor design, improper build or release procedures, managers should be notified and provided with some documentation as evidence of the problem.

Q4. How do you know when to stop testing?

A: This can be difficult to determine. Many modern software applications are so complex and run in such an interdependent environment, that complete testing can never be done. Common factors in deciding when to stop are...
  • Deadlines, e.g. release deadlines, testing deadlines;
  • Test cases completed with certain percentage passed;
  • Test budget has been depleted;
  • Coverage of code, functionality, or requirements reaches a specified point;
  • Bug rate falls below a certain level; or
  • Beta or alpha testing period ends.

Most Frequently Asked Testing Types



In this post, we are trying to cover the most frequently asked testing terms in most of the interviews. 
 
Q1. What is Testing:

It is process of verifying are we developing the right product or not and also    validating the developed product is right or not
     Software Testing = Verification + Validation

Q2. What is Verification?

It is a process of verifying: Are we developing the right product or not. Known as static testing.

Q3.What is Validation?

It is a process of validating: Does the developed product is right or not. Also called as dynamic testing.

Q4. What is black box testing?

Black box testing is functional testing, not based on any knowledge of internal software design or code. Black box testing are based on requirements and functionality.

Q5. What is white box testing?

White box testing is based on knowledge of the internal logic of an application's code. Tests are based on coverage of code statements, branches, paths and conditions.

Q6. What is unit testing?

Unit testing is the first level of dynamic testing and is first the responsibility of developers and then that of the test engineers. Unit testing is performed after the expected test results are met or differences are explainable/acceptable.

Running Selenium Code on Multiple Browsers

Below is the code which might be helpful to you. This code will allow you to launch your URL in Google Chrome, Internet Explorer as well as in Firefox:

public class browsers {
public static WebDriver driver = null;
public static void openbrowser (String browser)
{
if (browser.equalsIgnoreCase("Firefox"))
{
System.out.println("initiated");
driver = new FirefoxDriver();
}

Elements of JMeter


Below figure represents most widely used components of JMeter called as elements:

JMeterTutorial

Studying all of the JMeter Components will be confusing so I am covering only the most important JMeter elements:
  1. Thread Group
  2. Samplers
  3. Configuration
  4. Listeners

Thread Group

Event By ThoughtWorks : Beyond Automation - Continuous Integration : Gurgaon



This is just to inform you about the upcoming event on Beyond Automation - Continuous Integration. This event is being organised by ThoughtWorks on Saturday 06 Dec, 2014 09:00 AM at:

ThoughtWorks Technologies (India) Pvt Ltd. 

6th Floor, 
Tower Building No. 14
DLF Cyber City Phase III
Gurgaon-122002, Haryana

Beyond Automation - Continuous Integration’ will be an interactive workshop which aims to challenge your skill set to a level beyond automation. Continuous delivery has become the mantra in the agile world to get the automation test results feedback at the earliest in a short span of time. When there are frequent code pushes in a distributed or non-distributed team, it becomes important to have your set of tests with each build as every time doing it manually is a difficult task.

The topics covered will be appropriate for testers with basic knowledge of selenium. Also do bring your own Windows machines having Java and Selenium setup.

For registration, do visit below link:

If you face any issue, you can contact me by completing the Contact Us form.

JMeter Tutorial : Introduction to JMeter


This is just an introduction to JMeter. Below are some points covered in this video:

- How to install and configure JMeter?
- Why JMeter and Features of JMeter
- History of JMeter
- Parameters of JMeter
- Introduction to Sampler, Threads, Listeners, Controllers, Timer, Pre-Processor, Post-Processor, Test Plan, Work Bench etc






Continuous Integration Tool : Jenkins + Selenium + TestNG


A complete tutorial for Continuous Integration Tool : Jenkins

What is Continuous Integration?

“Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration
errors as quickly as possible” – Martin Fowler

CI - Workflow














CI - Benefits

  • — Immediate bug detection
  •  No integration step in the lifecycle
  •  A deployable system at any given point
  • — Record of evolution of the project

Jenkins

About Jenkins

  • Branched from Hudson
  • —Java based Continuous Build System
  • Runs in servlet container
  • Glassfish, Tomcat
  • Supported by over 400 plugins
    • SCM, Testing, Notifications, Reporting, Artifact Saving, Triggers, External Integration
  • Under development since 2005
  • http://jenkins-ci.org/

Jenkins - History


  • 2005 - Hudson was first release by Kohsuke Kawaguchi of Sun Microsystems
  • 2010 – Oracle bought Sun Microsystems
    • Due to a naming dispute, Hudson was renamed to Jenkins
    • Oracle continued development of Hudson (as a branch of the original)

What can Jenkins do?


  • Generate test reports
  • —Integrate with many different Version Control Systems
  • Push to various artifact repositories
  • Deploys directly to production or test environments
  • Notify stakeholders of build status 
  • …and much more

Step By Step : Process to Install and Configure Jenkins With your Script.

1) Download Jenkins by clicking here:












2) Keep the downloaded Jenkins.war file where your project is placed. For Example:











3) Open Command Prompt and go to the project path. Like:






4) After going to that path, write java -jar jenkins.war and press Enter.

How to take Screenshots if Test Case fails?


One basic question which comes in everyone's mind is : What happens if test case fails? Where was the error in script and How can we capture it?

So, the solutions is always (at least in most of the cases) to take screenshots of webpage when the test run fails.

With one look at the screenshot we can get an idea of where exactly the script got failed. Moreover reading screenshot is easier compare to reading 100's of console errors

To get screenshot on test failure, we should put the entire code in try-catch block. In the catch block we should paste the screenshot code:

public class TakeScreenshot {
 
   WebDriver driver;
 
 @BeforeTest
 public void start(){
  driver = new FirefoxDriver();
 }


Run a Bat File with Java Program


Sample JAVA Code:

public class RunBat {

public static void main(String[] args) throws IOException, InterruptedException{

Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec("cmd /c F:\\bb.bat");
process.waitFor();
}
}

How to handle Authentication PopUp using Selenium?

Sometime we have to automate websites which shows authentication Pop Up like mentioned below:











In order to automate this PopUp, we will pass UserId and Password via URL:

http://username:password@anytestwebsite.com

Java Script:

String URL = "http://" + username + ":" + password + "@" + anytestwebsite.com;
driver.get(URL);
Alert alert = driver.switchTo().alert();
alert.accept();

Database Connection in Selenium


  • Below is the source code to connect your MySQL database with Selenium :
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection) DriverManager.getConnection ("jdbc:mysql://localhost:3306/demo","username","password");
Statement stmt = (Statement) con.createStatement();
// Below statement we use for executing sql queries.
stmt.executeQuery("Select * from dbtable");

In order to connect, you will need to add one jar file which you can download by clicking here

  • To connect Oracle database with Selenium, write below code:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost: 
1521:orcl","username","password");
Statement stmt = con.createStatement();
stmt.executeQuery("Select * from dbtable");

In order to connect, you will need to add one jar file which you can download by clicking here

Selenium Webdriver Architecture


This diagram is just to show how Selenium Webdriver works. If anyone asks for Selenium Webdriver architecture then just need to design the below diagram and explain it. I share this as it is one of the most frequently asked Selenium Question

Selenium Architecture
Selenium Webdriver Architecture

Selenium Remote Control Architecture


This diagram is just to show how Selenium Remote Control works. If anyone asks for Selenium RC architecture then just need to design the below diagram and explain it. I share this as it is one of the most frequently asked Selenium Question


Selenium RC Architecture
Selenium Remote Control Architecture

Alert handling in Selenium


public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
String Url = "http://sislands.com/coin70/week1/dialogbox.htm";
driver.get(Url);
WebElement alert = driver.findElement(By.xpath("///div[1]/center/table/tbody/tr/td/form[1]/p/input"));
alert.click();
Alert popup = driver.switchTo().alert();
System.out.println(popup.getText());
popup.accept();
Thread.sleep(3000);
driver.close();

}

Pick Date From a Calendar in Selenium



public static void main(String[] args) throws InterruptedException {

WebDriver driver = new FirefoxDriver();
driver.get("http://jqueryui.com/datepicker/");
driver.manage().window().maximize();
driver.switchTo().frame(0);
driver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);
driver.findElement(By.xpath("//*[@id='datepicker']")).click();
driver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);
driver.findElement(By.xpath("//*[@id='ui-datepicker-div']/div/a[2]/span")).click();
List column = driver.findElements(By.tagName("td"));
for (WebElement j : column)
{
if (j.getText().contains("13")){
j.findElement(By.linkText("13")).click();
break;
}
}
Thread.sleep(5000);
}

How to write dynamic Xpath to identify elements on Webpage?


We always have concerns about writing Dynamic Xpath. So, I've listed below some ways to write xpath with example. If you face any problem, Contact Us:

1) Based on location
2) Using Single Attributes
3) Using Multiple Attributes
4) Using functions


All examples are based on following HTML Code:

input class="search-field" name="s" placeholder="Search …" title="Search for:" type="search" value=""