Monday, February 24, 2020

Interview Questions

1. In TestNG How can I run same test case multiple times?
Ans: @Test(invocationCount = 10)


public void testCount() {..}

2. What is use of @tag in Cucumber ?



Cucumber Options tag is used to provide a link between the feature files and step definition files. Each step of the feature file is mapped to a corresponding method on the step definition file.
Below is the syntax of Cucumber Options tag:

@CucumberOptions(features="Features",glue={"StepDefinition"})
3. Difference between Scenario & Scenario Outline ?

Scenario outline is a way of parameterization of scenarios. This is ideally used when the same scenario needs to be executed for multiple sets of data, however, the test steps remain the same. Scenario Outline must be followed by the keyword ‘Examples’, which specify the set of values for each parameter.

4. How to Access Data from Excel file ?

5. How to access Data from Config. Property file ?
6. Difference between Interface and Abstraction ?
7. Difference between this and Super Keyword ?

25 Feb & 26th Feb
1. What is lambda Expression in java
2. If two interface  with same methods & implemented in other class what will happen ?
3. What is Implicit wait, Explicit wait & Fluent Wait.
4. Interface
5. Why WebDriver driver= new Chrome Driver()
6. Constructor Overloading & Constructor Overriding
ans: remember we can't override Constructor

7. What is meaning of each word of line public static void main(String[] args) ?
public -its the access specifier means from every where we can access it; static -access modifier means we can call this method directly using a class name without creating an object of it; void - its the return type; main - method name string [] args - it accepts only string type of argument.

8.  We can create multiple main methods in same class ?
Yes, you can have as many main methods as you like. You can have main methods with different signatures from main(String[]) which is called overloading, and the JVM will ignore those main methodsYou can have one public static void main(String[] args) method in each class.

9. What is heap Memory ?
The heap is a memory used by programming languages to store global variables. By default, all global variable are stored in heap memory space. It supports Dynamic memory allocation. The heap is not managed automatically for you and is not as tightly managed by the CPU. It is more like a free-floating region of memory.

10. String Methods
11. Interfaces in Selenium
12. Java Exceptions
13. Selenium Exceptions
14. Explicit wait methods or commands 

Interview Questions Asked in Mock :

How you handle Multiple Window Scenario in your project ?
How to Handle Window pop up ?
Difference Between Class & Interface ?
Can we use Implement & Extend keywords at the same time ?
Can we use one Interface in another Interface ?
Difference Between Collections and Collection ?
String & String Buffer ?
Diff Set & List ?
Diff Bet Constructor & Method ?
Eg. of Parameterised Constructor used in project ?
Diff Priority & Severity ?
How will you resolve Synchronisation issues?
What you have done in your 4 years & what Scenarios Automated ?
How to Create Branch on Git ?
How to move from one Branch to Another Branch ?
How to add file on Git ?

How many Members in Your Team ?
Which type of Testing Framework using to Run your Test Cases ?
How Long to take to Execute Test Pack ?
How you will Reduce time of Execution ?

How you resolved timing issues or Synchronization Issues (like page not load or site not working or net slow) ?
what are challenges you faced ?
How will you make sure Failure is not interment at the time of Test pack ?
How you Debug Test Cases ?
If Test case is Failed & Screen shot should be taken how does it Identify & automate ?
How Framework know TCs are failed & need to Take Screenshot ?
Have You implemented Listeners? Where ?
Are you part of Framework at the time of Frame Design ?






1. Polymorphism
2. Method overloading & Overiding ?
3. Super & this Key word ?
4. Final Keyword ? Where we can use it ?
5. What is Wrapper Class & Where we used it ?
6. Diff btn Abtract class & Interface ?
7. Diff Hash Map & Hash Table ?
8. Exception defination & its type ?
9. Selenium Exception & When it occures ?
10. Diff Git & Github ?
11. How will you Handle Window & Wondows ?
12. Types of Alert ? web Based Alerts ?
13. How many Locators & Name ?
14. Absolute xpath & Relative xpath ?
15. Which Selenium version your are using ?
16. Bug Life Cycle ?
17. How you take Screenshot ?
18. What are methods in Itake Listener ?
19. How you run Failed TC? 
20. Data Provider ?
21. How would you find Broken Link from Selenium ?
22. Maven Life Cycle ?
23. Goals in Maven ?



1. How do you decide which TCs automate 1st?
2. Briefly about your project ?
3. 


LnT
testbase package:
extended pagelayer
Test Layer: write tests
Configuration: Cong of Webdriver, java Script, poc,
Test Data: Excel file, 
Utility: called as reusable: java utility class, webelement, java script utility,

2.how you call parent Constructor ? 
if you create obj of child class it it call by explicitly or implicity?
3. Collection ?
4. If you want to sort list how you will do that ? Tell sample code of it ?
5. Final And Finally ?
6. Compile time polymorphism (early binding) & run time polymorphism (late Binding)?
7. Have you know about db connection ?
if 2 database & fire a query to retrieve data from 1st data base & fetch it with second database. 

8. can we use excel as a DB ?
9. how you invoke bat file or exe file by using java ?
10. AutoID  (Relevant quetions what we saying)
11. have you performed mouse hover operation ? which methods for it ?
12. Have you haired abour desired capabilities ?
13. Security Certificate ? it comes on Internet 
14. which browser you worked on ?
15. Consider one Login link three webpages are opened & out of it 2 are advertice we need to close it & do operation on 3rd one ?
ans: by using Window handle will take list 


Wipro
1. Tell me you exposure on Automation ?
2. Are you directly  involved in designing FW?
3. What is Web Services?
4. Are you individual contribute in your FW ?
5. Relevant - you know Maven ? you know Maven life cycle ? for what purpose it use ? what is Maven ?
6. If any jar not available in maven centralize repo then how how add it ? how hat jar will be deploy on client machine if you already send project ?
7. Interface with example not standard definition ?
8.   are you able to create object in abstract class ?
9. class A Abstract & Class A extending in Class B both are having same method with same name its overridden then you have to call concrete method of class A or how to call method of Abstract Class ?

again once more , suppose simple 2 classes A and Class B both having same method with same name then how to call parent class method.

10. class B extending Class B, Class A having one Constructor and same in Class B.
which class method will be get called if A a =new B();
11. which version of java your using ? 
ans: 1.8
12. are you override static methods in java 1.8 ?
13. what about Aggregation ?
14.  what is method overriding ?
15 how to create group of methods in TestNg & how can run it ?


TCS:
1. Where you store Test data ?
2. how you fetch Test data from Excel file ?
3. Diff POM and Page Factory  
4. Can we use page Factory in POM
5. if condition what is diff between double equal and triple equal ?
6. What is Java Collection ?
7. How you work with Jira ? what task you perform on Jira ?
8. how you verify check box is checked ?
9. how you perform right click operation? tell code ?
10. Oopse concepts ?
11. can we achieve overriding within same class ?
ans: No
12. can we achieve overloading within same class ?
ans: no
13. Access Specifier and how it apply on method,class, variable ?
14. how we check element displayed or not ?
ans: isDisplayed 


1) Explain test harness

A test harness for Cucumber and rspec allows for separating responsibility between setting up the context and interacting with the browser and cleaning up the step definition files
What is TDD
 Test-driven development is a process of modifying the code in order to pass a test designed previously. In Software Engineering, It is sometimes known as "Test First Development." TDD includes refactoring a code i.e. changing/adding some amount of code to the existing code without affecting the behavior of the code.
  
What is the name of the plugin that is used to integrate Eclipse with Cucumber?
Ans: Cucumber Natural Plugin is the plugin that is used to integrate Eclipse with Cucumber.



No comments:

Post a Comment

String

  Java String  class provides a lot of methods to perform operations on strings such as compare(), concat(), equals(), split(), length(), re...