Software Testing

Given below are some of the most important interview questions in Software Testing asked by the interviewers:

Q.1 White Box Techniques are also called as ?
White-box testing also known as clear box testing, glass box testing, transparent box testing, and structural testing. It is a method of testing software that tests internal structures or workings of an application, as opposed to its functionality.
Q.2 How many baselined documents requiring a many to many relationship are used in a traceability matrix ?
2 baselined documents requiring a many to many relationship are used in a traceability matrix. A traceability matrix is a document, usually in the form of a table, that correlates any two baselined documents that require a many-to-many relationship to determine the completeness of the relationship.
Q.3 Which type of automation testing builds a model of the application under test and then enables the tester to create test cases by simply editing in test parameters and conditions?
Scriptless automation testing builds a model of the application under test and then enables the tester to create test cases by simply editing in test parameters and conditions. Script-less is an approach to build an optimized test automation engine by empowering testing team to quickly build automated test cases by sequencing and ready but reusable code assets to ensure the full test coverage.
Q.4 What are the types of integration testing?
Integration testing (sometimes called integration and testing, abbreviated I&T) is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing. Big bang and top-down are types of integration testing.
Q.5 Could reviews or inspections be considered part of testing?
Yes, reviews or inspections be considered part of testing because both help detect faults and improve quality
Q.6 Describe the phases in Software Testing Life Cycle?
We will now discuss the different phases involved in the software testing life cycle are - 1. Requirement Analysis - Helps to understand the requirements and identify the testable requirements. 2. Test Planning - Test strategy is defined 3. Test Case Development - Test cases are defined and developed. 4. Environment Setup - Setup of software and hardware for the testing teams to execute test cases - . 5.Test Execution - Process of executing the code and comparing the expected and actual results 6. Test Cycle Closure - It involves calling out the testing team member meeting and assessing cycle completion criteria based on test coverage, quality, cost, time, critical business objectives, and software.
Q.7 Should we perform testing only after the build and execution phases are complete?
We must perform testing after the build and execution phases, as the earlier we catch a defect, the more cost effective it is. For instance fixing a defect in maintenance is ten times more costly than fixing it during execution.
Q.8 Describe the relationship between environment reality and test phases?
Since test phases start moving ahead therefore environment becomes more important. For instance while unit testing, we require 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.
Q.9 How is the cost effected if a defect that could have been removed during the initial stage is removed in a later stage?
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.
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.
Q.10 How can you can arrive at an estimation for a given project?
In order to estimate any project, you we must consider the following -
1.We must divide the whole project into the smallest tasks
2. We should then associate each task to team members
3. Then we should estimate the effort needed to complete each task
4. Thereafter validate the estimation
Q.11 Which test cases should we write first - white boxes/black boxes and why?
In general, black box test cases are written first and white box test cases later. In order to write black box test cases we would need the requirement document and, design or project plan, as there documents are easily available at the initial start of the project. On the other hand white box test cases cannot be started in the initial phase of the project since they require more architecture clarity that is not available at the beginning of the project. Therefore white box test cases are written post black box test cases are written.
Q.12 Why is automation testing in agile methodology considered useful?
Automation testing is considered extremely very useful in agile methodology as it assists in achieving maximum test coverage in a lesser time of the sprint.
Q.13 What is the basis of mapping the success of Automation testing?
The basis of mapping the success of Automation testing are -
1. Defect Detection Ratio
2. Automation execution time and time savings to release the product
3. Reduction in Labour and other costs
Q.14 How should we explain load testing on websites?
In order 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 to which we want to access. Now in order 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.
Q.15 What do you understand by TestNG?
TestNG is an advanced framework that has been designed in a way to leverage the benefits by both the developers and testers. TestNG also has an inbuilt exception handling mechanism that lets the program to run without terminating it unexpectedly.
Q.16 What do you understand by Object Repository and how can we create Object Repository in Selenium?
Object Repository is the collection of web elements belonging to Application Under Test (AUT) together with their locator values. Now with respect to Selenium, objects can be stored in an excel sheet which can be populated inside the script whenever required.
Q.17 What do you understand by workbench concept?
Workbench is a way of documenting how a specific activity that has to be performed. It is often referred to as phases, steps, and tasks. There are five tasks for every workbench -
1. Input
2. Execute
3. Check
4. Production output
5. Rework
Q.18 What do you understand by Defect Cascading?
Defect cascading refers to a defect that is caused by another defect. Such that one defect triggers the other defect. Therefore when a defect is present in any stage but is not identified, hide to other phases without getting noticed. This will therefore result in an increase in the number of defects.
Q.19 How can you find broken links in a page using Selenium WebDriver?
This is considered as a very tricky question which the interviewer might present. The interviewer might provide a situation wherein there are 20 links in a web page, and we have to verify which of those 20 links are working and how many are not working (broken).
You are required to verify the working of every link, for this you need to send HTTP requests to all of the links on the web page and analyze the response. Therefore whenever you use driver.get() method to navigate to a URL, it will respond with a status of 200 – OK. This demonstrates that the link is working and it has been obtained, whereas any other status indicates that the link is broken.
We can do this in the following way - At first, we have to use the anchor tags to determine the different hyperlinks on the web page. So for every tag, we can use the attribute ‘href’ value to obtain the hyperlinks and then analyze the response received when used in driver.get() method.
Q.20 Which technique should you consider in the script “if there is neither frame id nor frame name”?
In case frame name and frame id is not available, then we can use frame by index. For instance, there are 3 frames in a web page and if none of them have a frame name and frame id, then we can still select those frames by using frame (zero-based) index attribute. All the frame will have an index number like the first frame would be at index “0”, the second at index “1” and the third at index “2”.
driver.switchTo().frame(int arg0);
Q.21 How should we take screenshots in Selenium WebDriver?
We can take screenshots in Selenium WebDriver by using the TakeScreenshot function you can take a screenshot. Also with the help of getScreenshotAs() method, you can simply save that screenshot.
Example: File scrFile = ((TakeScreenshot)driver).getScreenshotAs(outputType.FILE);
Q.22 How to skip a method or a code block in TestNG?
To skip a particular test method or a code, then you can set the ‘enabled’ parameter in test annotation to false.
@Test(enabled = false)
Q.23 In software testing, what are the tasks of Test Closure activities?
Test Closure activities can be categorized in four major groups -
1. Test Completion Check: In order to ensure all tests should be either run or deliberately skipped and all known defects should be either fixed, deferred for a future release or accepted as a permanent restriction.
2. Test Artifacts handover: Tests and test environments should be handed over to those responsible for maintenance testing. Known defects accepted or deferred should be documented and communicated to those who will use and support the use of the system.
3. Lessons learned: Analyzing lessons learned to determine changes needed for future releases and projects. In retrospective meetings, plans are established to ensure that good practices can be repeated and poor practices are not repeated
4. Archiving results, logs, reports, and other documents and work products in the CMS (configuration management system).
Q.24 What do you understand by Code coverage?
Code coverage is very different from Test coverage. As code coverage is about unit testing practices that must target all areas of the code at least once. It is usually done by developers or unit testers.
Q.25 What do you understand by Big Bang Approach?
Big Bang Approach refers to the process of combining all the modules once and verifying the functionality after completion of individual module testing. The top down and bottom up are carried out by using dummy modules known as Stubs and Drivers. These Stubs and Drivers are used to stand-in for missing components to simulate data communication between modules.
Q.26 Define the principles of Software Testing.
The principles of Software Testing are -
1. Testing shows presence of defects
2. Exhaustive testing is impossible
3. Early testing
4. Defect clustering
5. Pesticide Paradox
6. Testing is context depending
7. Absence of error fallacy
Q.27 What do you understand by Pesticide Paradox?
In software testing, Pesticide Paradox refers to the process of repeating the same test cases, again and again, eventually, the same test cases will no longer find new bugs. Therefore in order to overcome this Pesticide Paradox, it is necessary to review the test cases regularly and add or update them to find more defects.
Q.28 What do you understand by Defect Cascading in Software Testing?
In Software testing. Defect cascading refers to the process triggering of other defects in an application. Such that when a defect is not identified or goes unnoticed while testing, it invokes other defects. This leads to multiple defects in the later stages and results in an increase in a number of defects in the application. For instance if there is a defect in an accounting system related to negative taxation then the negative taxation defect affects the ledger which in turn affects other reports such as Balance Sheet, Profit & Loss etc.,
Get Govt. Certified Take Test