Automation Testing Interview Questions| Selenium Interview Questions| 0-2 years

Published: 31 May 2021
on channel: RD Automation Learning
72,018
1.3k

​ @RD Automation Learning
#AutomationTestingInterviewQuestions
#AutomationInterviewQuestions
#FresherInterviewQuestions
#SeleniumInterviewQuestions

1. Consider two methods in TestNG, one is having prioity 1 and other is having priority as 0 so which one will execute first

priority 0

2. Consider two methods in TestNG, one is having prioity 1 and other is having no priority so which one will execute first?

If test priority is not defined while, running multiple test cases, TestNG assigns all @Test a priority as zero(0). Now, while running; lower priorities will be scheduled first

3. Consider two methods in TestNG, one is having prioity 1 and other is having priority as 1 so which one will execute first?
based on their alphabetical order

4. What is super keyword in java
The super keyword in java is a reference variable that is used to refer parent class objects. The keyword “super” came into the picture with the concept of Inheritance.

7. difference between hardassert & soft aseert
Hard Assert – Hard Assert throws an AssertException immediately when an assert statement fails and test suite continues with next @Test

The disadvantage of Hard Assert – It marks method as fail if assert condition gets failed and the remaining statements inside the method will be aborted.

To overcome this we need to use Soft Assert. Let’s see what is Soft Assert.

Soft Assert – Soft Assert collects errors during @Test. Soft Assert does not throw an exception when an assert fails and would continue with the next step after the assert statement.
8.
Can we use regular expression in TestNG groups?
Yes, regular expressions can be used in TestNG to execute the groups which have some typical pattern in their name. For example, if I want to run all the groups with a name starting from “abc,” then I can write the regular expression as abc.* in the XML file.


9. What is the significance of “timeout” in TestNG?

In TestNG, “timeout” is a parameter that defines the maximum time that a method can take for execution. The timeout parameter is handy if the execution time is a constraint during testing, or the tester wants to take precautions against the endless execution of tests. We can declare the timeout parameter at:

suite level: To put a time constraint on all the methods in the suite.
method level: To put the time constraint on a particular method.
Syntax:

@Test (timeout = 1000)

10. thread.sleep(-1000) what exception u will get

Illegal argument exception

11. what is thread, what is sleep?
The sleep() method of Thread class is used to sleep a thread for the specified amount of time.

13. Output of Java Program

byte a=10;
byte b=10;
//byte c=a+b;//Compile Time Error: because a+b=20 will be int
byte c=(byte)(a+b);
System.out.println(c);

14. Naming conventions for Constant variables:
Should be all uppercase with words separated by underscores (“_”).
There are various constants used in predefined classes like Float, Long, String etc.
Examples:

static final int MIN_WIDTH = 4;

15. Negative test scenarios for COWIN portal
Network failure
wrong aadhar caard
wrong number
try to book

16. What is JSON?
JSON stands for JavaScript Object Notation. JSON is a lightweight format for storing and transporting data. JSON is often used when data is sent from a server to a web page. JSON is not a programming language. It is a common and open standard format for storing and exchanging data. JSON is language independent.

18. What are the main challenges faced in API testing?

Some of the challenges we face while doing API testing are as follows

Selecting proper parameters and its combinations
Categorizing the parameters properly
Proper call sequencing is required as this may lead to inadequate coverage in testing
Verifying and validating the output
Due to the absence of GUI, it is quite difficult to provide input values



19. What are the principles of Software Testing?

Testing shows presence of defects
Exhaustive testing is impossible
20. What is Exhaustive Testing?
Testing all the functionalities using all valid and invalid inputs and preconditions is known as Exhaustive testing.

21. What is Early Testing?
Defects detected in early phases of SDLC are less expensive to fix. So conducting early testing reduces the cost of fixing defects.

222. What is Defect clustering?
Defect clustering in software testing means that a small module or functionality contains most of the bugs or it has the most operational failures.

23. What is Pesticide Paradox?
Pesticide Paradox in software testing is the process of repeating the same test cases, again and again, eventually, the same test cases will no longer find new bugs. So to overcome this Pesticide Paradox, it is necessary to review the test cases regularly and add or update them to find more defects.


Watch video Automation Testing Interview Questions| Selenium Interview Questions| 0-2 years online without registration, duration hours minute second in high quality. This video was added by user RD Automation Learning 31 May 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 72,01 once and liked it 1.3 thousand people.