4 Explain how can you find broken links in a page using Selenium WebDriver?
This is a tricky question which the interviewer might present to you. He can 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).
As you have to verify the working of every link, the workaround is that you need to send HTTP requests to all of the links on the web page and analyze the response. Whenever you use driver.get() method to navigate to a URL, it will respond with a status of 200 – OK. This indicates that the link is working and it has been obtained. Whereas any other status indicates that the link is broken.
There are three methods of software testing and they are as follows:
Black-box testing: It is a testing strategy based solely on requirements and specifications. In this strategy, it requires no knowledge of internal paths, structures, or implementation of the software being tested.
White boxtesting: It is a testing strategy based on internal paths, code structures, and implementation of the software being tested. White box testing generally requires detailed programming skills.
Gray box testing: It is a strategy for software debugging in which the tester has limited knowledge of the internal details of the program.
Mention some features of Java?
Some of the features which play an important role in the popularity of java are as follows:
Simple: Java is easy to learn. Even though Java is based on C++ , it was developed by eliminating poor programming practices of C++.
Object-Oriented: Java is an object-oriented programming language. Everything in Java is an Object.
Portable: Java run time environment uses a bytecode verification process to make sure that code loaded over the network doesn’t violate Java security constraints.
Platform independent: Java is platform-independent. Java is a write once, run anywhere language. Without any modifications, we can use a program on different platforms.
Secured: Java is well known for its security. It delivers virus-free systems.
High Performance: Java enables high performance with the use of JIT (Just-In-Time) compilers
Multithreaded: Java Multithreaded features allows us to write programs that can perform many tasks simultaneously. The multithreading concept of Java shares a common memory area. It doesn’t occupy memory for each thread.
Explain how does a test coverage tool work?
When software is being tested, the code coverage measures how much of the programs source code is covered by the test plan. Code coverage testing runs in parallel with actual product testing. Using the code coverage tool, you can monitor the execution of statements in your source code. A complete report of the pending statements, along with the coverage percentage, is provided at the end of the final testing.
5 What is the V model in software testing?
V-models, also known as validation or verification models, are SDLC models where the process occurs sequentially in a V-shape. This method consists of associating a testing phase with each corresponding development stage. As each development activity is accompanied by a testing activity, the next test phase occurs only after the previous phase has been completed.
Validation: It is defined as a process that involves dynamic testing of software products by executing the code. This process validates whether we are building the right software that meets that customers requirement or not. It involves various activities like system testing, integration testing, user acceptance testing, and unit testing.
Verification: The technique involves static analysis (review) without running the code. It is defined as a process that involves analyzing the documents. This process verifies whether the software conforms to specifications or not. Its ultimate goal is to ensure the quality of software products, design, architecture, etc.