Table of Contents
Intermediate Level Software Testing Interview Questions and Answers
1. Should testing be done only after the build and execution phases are complete?
Testing is always done after the build and execution phases Earlier we catch a defect, the more cost effective it is. For example, fixing a defect in maintenance is ten times more costly than fixing it during execution.
2. What’s the relationship between environment reality and test phases?
As test phases start moving ahead environment reality becomes more important. For example, while unit testing, you need the environment to be partly real, but at the acceptance phase you should have a 100% real environment, or we can say it should be the actual real environment.
The above graph shows during acceptance testing it should be 100% real.
3. A defect which could have been removed during the initial stage is removed in a later stage. How does this affect the cost?
If at the initial stage a defect is identified, then it should be removed during that stage/phase itself rather than at some later stage. It’s a fact that if a defect is delayed for later phases it becomes more costly. The following figure shows how a defect is costly as the phases move forward.

If a defect is identified and removed during the design phase, it is the most cost effective but when removed during maintenance it becomes twenty times costlier.
4. What do you mean by regression and confirmation testing?
Regression Testing: It is defined as a type of software testing to confirm that a recent code change has not adversely affected existing features.
Confirmation Testing: When a test fails because of the defect, the defect is reported. Then a new version of the software is submitted whose defect is fixed. This is called as confirmation testing or re-testing.
5. What do you mean by boundary value analysis?
Boundary Value Analysis (BVA) is a black box test design technique which is applied to see if there are any bugs at the boundary of the input domain.
6. What is Random testing?
Usually, in Random testing, data is generated randomly often using a tool. For example, the following figure shows how randomly-generated data is sent to the system.
This data is generated either using a tool or some automated mechanism. With this randomly generated input, the system is then tested and results are observed accordingly.
7. On what basis you can arrive at an estimation for your project?
To estimate your project, you have to consider the following points:
- Divide the whole project into the smallest tasks
- Allocate each task to team members
- Estimate the effort required to complete each task
- Validate the estimation
8. Which test cases are written first: white boxes or black boxes?
Usually, black box test cases are written first and white box test cases later. To write black box test cases we need the requirement document and, design or project plan. These documents are easily available at the initial start of the project. White box test cases cannot be started in the initial phase of the project because they need more architecture clarity which is not available at the start of the project. So normally white box test cases are written after black box test cases are written.
9. Mention the basic components of defect report format.
The basic components of defect report format include:
- Project Name
- Module Name
- Defect detected on
- Defect detected by
- Defect ID and Name
- Snapshot of the defect
- Priority and Severity status
- Defect resolved by
- Defect resolved on
10. Is Automation testing in agile methodology useful?
Automation testing is very useful in agile methodology and helps in achieving maximum test coverage in a lesser time of the sprint.
11. Which test cases can be automated?
- Smoke test cases
- Regression test cases
- Complex calculation test cases
- Data-driven test cases
- Non-functional test cases
12. On what basis you can map the success of Automation testing?
By following criteria, the success of Automation testing can be mapped:
- Defect Detection Ratio
- Automation execution time and time savings to release the product
- Reduction in Labour & other costs
13. Explain Load Testing on websites?
To access a website, a user sends a “request” to that website’s server, and the server sends back a response in the form of the website you want to access. To load test a website, quality assurance engineers and automation engineers just need to multiply the number of responses sent to simulate different traffic loads. The web server’s response to the influx of virtual users can then be measured. This is used to determine performance issues and server capacity.
14. What is the difference between Selenium and Sikuli?
Selenium | Sikuli |
It cannot automate flash objects like video player, audio player etc. | It provides extensive support to automate flash objects |
It has got complicated API | It has a simple API |
It can automate only web applications | It can automate the web as well as a windows application. |
15. How to click on a hyperlink using linkText()?
1 | driver.findElement(By.linkText(“Google”)).click(); |
This command finds the element using link text and then click on that element. Thus, the user would be re-directed to the corresponding page.
16. What is TestNG?
It is an advanced framework which is designed in a way to leverage the benefits by both the developers and testers. It also has an inbuilt exception handling mechanism which lets the program to run without terminating unexpectedly.
17. How to set test case priority in TestNG?
Below code helps you to understand how to set test case priority in TestNG.
1 2 3 4 5 6 7 8 9 10 11 12 13 | package TestNG; import org.testng.annotations.*; public class SettingPriority { @Test(priority=0) public void method1() { } @Test(priority=1) public void method2() { } @Test(priority=2) public void method3() { } } |
Test Execution Sequence:
1 2 3 | Method1 Method2 Method3 |
18. What is the difference between Selenium and QTP?
Selenium | Quick Test Professional |
Selenium supports almost all the popular browsers like Firefox, Chrome, Safari, Internet Explorer, Opera etc | QTP supports Internet Explorer, Firefox and Chrome. QTP only supports Windows Operating System |
Selenium is distributed as an open source tool and is freely available | QTP is distributed as a licensed tool and is commercialized |
Selenium supports testing of only web-based applications | QTP supports testing of both the web-based application and windows based application |
19. What is Object Repository? How can we create Object Repository in Selenium?
Object Repository refers to the collection of web elements belonging to Application Under Test (AUT) along with their locator values. With respect to Selenium, objects can be stored in an excel sheet which can be populated inside the script whenever required.
20. How to input text in the text box using Selenium WebDriver?
By using sendKeys()method we can input the text in the text box using Selenium WebDriver.