QA interview questions

QA interview questions

This post is a bit different that other post on this blog. I decided to present a set of questions which may be asked during the interview to a QA job. Of course, it is only a small subset of all possible questions, but it gives you an overview what you can expect from that kind of meeting. Each question has an answer.

If you would like to be sure that you can answer this and many other questions during QA interview, you can sign up for a weekly mail course http://mailcourse.seleniumbook.com/

Sign up for free end-to-end testing training

Learn how to create end-to-end tests for your applications from the beginning to mobile testing
Name
Email address

What is a Test Case? What does it include?

A Test Case is a step by step description of the testing process and a set of conditions under which a tester can determine if the application works as expected.

It includes:

  • test case description
  • test steps
  • requirements
  • expected result

What are different types of software testing?

It is four main categories, but there are much more test types in each category.

  • Unit Testing – test smallest parts of application, single methods or classes
  • Integration Testing – test single modules combination, treated as a group
  • System Testing – test without knowledge of inner design or logic. Evaluate the complete system
    • Functional – related to functionality
    • Smoke testing – preliminary tests, that checks application condition
    • Regression testing – verifies that software previously developed and tested still performs correctly
    • Non-functional – test the way how system operates, rather than specific behaviors of that system
    • Performance testing – determine how a system performs regarding responsiveness and stability under a particular workload
    • Security testing – reveal flaws in the security mechanisms of an information system that protect data and maintain functionality as intended
  • UAT – formal testing on user needs and requirements to enable the user or customers to determine whether or not to accept the system

Source

When should testing start in a project? Why?

For Unit and Integration testing you should start as soon as possible. When the requirement is ready and you will start to write code.

For System and End to end testing, you should start before the first presentation for the customer.

What is end-to-end testing?

It is testing a complete application. It simulates real-world use, such as interacting with a database, using network communication, or interacting with other hardware, application, or system.

What is acceptance testing?

Acceptance testing is done by the user or customer although other stakeholders may be involved as well.
The goal of acceptance testing is to establish confidence in the system.

Source

How will you find an element using Selenium?

In Selenium every object or control in a web page is referred as an elements, there are different ways to find an element in a web page:

  • Id
  • Name
  • TagName
  • CssSelector
  • LinkText
  • PartialLinkText
  • XPath
  • ClassName

Explain what is assertion in Selenium

The assertion is used to verify a point in a test case. It verifies that the state of the application conforms to expectations.

What are the types of assertion?

Assertion types in NUnit:

  • Equals
  • Pass
  • Fail
  • Ignore
  • Inconclusive
  • That
  • Throws
  • DowsNotThrow
  • IsTrue
  • IsFalse
  • IsNotNull
  • IsNull
  • AreEqual
  • AreNotEqual
  • AreSame
  • AreNotSame
  • IsNaN
  • IsEmpty
  • IsNotEmpty
  • IsAssignableFrom
  • IsInstanceOf
  • Greater
  • GreaterOrEqual
  • Less
  • LEssOrEqual
  • Contains

Mention what is the use of X-path?

It is used to find elements on web page. It is another for of CSS selectors. It is a language to address parts of XML documents.

List out the technical challenges with Selenium?

  • only for web applications
  • have to depend on third party tools for reporting related capabilities
  • hard to maintain element selectors during development

What is the difference between Implicit wait and Explicit wait?

Implicit Wait

Sets a timeout for all Web Element searches. It will try looking for element presence again and again before throwing a NoSuchElementException for the specified amount of time.

Explicit Wait

It is a timeout for a particular operation.

Explain what is the difference between FindElement() and FindElements()?

FindElement()

It finds the first element within the current page using the given selector. It returns a single WebElement.

FindElements()

It finds all elements within the current page using the given selector. It returns a list of web elements as IEnumerable<IWebElement>.

How you can fill the text box using WebDriver?

You can find proper element and send text for it:

driver.FindElement(By.id(“textBoxId”)).sendKeys(“value”);

How you can perform double click using WebDriver?

You can perform double click using:

var action = new Actions(driver);
action.DoubleClick(driver.FindElement(By.Id(“elementId”)))
.Perform();

Explain how you can debug the tests in Selenium WebDriver?

  • Place the breakpoint in Visual Studio into the test case code
  • Run test in debug mode
  • Wait for test to stop at breakpoint
  • Enjoy debugging features in Visual Studio

Explain what can cause a Selenium IDE test to fail?

  • selector to element changed and Selenium cannot locate the element
  • selenium waiting to access an element which did not appear on the web page and the operation timed out
  • when an assertion fails

What are the different types of Drivers available in WebDriver?

The drivers available in WebDriver are:

How to assert the title of the web page?

You can assert page title using Title property of driver object.

Assert.AreEqual(driver.Title, “Page Title”);

How to retrieve CSS properties of an element?

The values of the CSS property can be retrieved using a GetCssValue method:

driver.FindElement(By.Id(“elementId”)).GetCssValue(“font-size”);

GET YOUR EMAIL UPDATES

Get great contents delivered straight to your inbox everyday, just a click away, Sign Up Now.
Name
Email address