Yash Technologies Test Automation Interview Questions and Answers for Experienced QA

Here is a next addition of Yash technologies automation QA interview question and answers

Please note: these question are already verified from respective source. If you have any additional question feel free to post in the comment section.

  1. What is abstract class ?

Abstraction is a process of hiding the implementation details and showing only functionality to the user.

Another way, it shows only essential things to the user and hides the internal details, for example, sending SMS where you type the text and send the message. You don't know the internal processing about the message delivery.

Abstraction lets you focus on what the object does instead of how it does it.

Ways to achieve Abstraction

There are two ways to achieve abstraction in java

  1. Abstract class (0 to 100%)
  2. Interface (100%)
abstract class Bike{  
  abstract void run();  
}  
class Honda4 extends Bike{  
void run(){System.out.println("running safely");}  
public static void main(String args[]){  
 Bike obj = new Honda4();  
 obj.run();  
}  
}  

2. Can we extend abstract class. If yes then what's the use of no then why

Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an implementation. ... In addition, you can extend only one class, whether or not it is abstract, whereas you can implement any number of interfaces.

3.what is the difference between private and protected methods?

You can read about different access modifier here

4. Reflection class. How it works?

Reflection is an API which is used to examine or modify the behavior of methods, classes, interfaces at runtime.

  • The required classes for reflection are provided under java.lang.reflect package.
  • Reflection gives us information about the class to which an object belongs and also the methods of that class which can be executed by using the object.
  • Through reflection we can invoke methods at runtime irrespective of the access specifier used with them.

You can read more about reflection here

?5. Why we used glue code in cucumber?

Glue Code is the code that interacts directly with your application. There are two kinds of Glue code – Step Definitions and Hooks. As we already covered hooks in another post, we’ll be focusing on the Step Definitions side of things today.

First off, a few best practices when creating your Step Definitions (or really any Glue Code).

  • The matcher is not overly verbose
  • The matcher handles both positive and negative (true and false) conditions
  • The matcher has at most two value parameters
  • The parameter variables are clearly named
  • The body is less than fifteen lines of code
  • The body does not call other steps

6. Maven and it's uses. Why we prefer maven over normal project?

Maven can be considered as complete project development tool not just build tool like Ant. You should use Eclipse IDE with maven plugin to fix all your problems.

Here are few advantages of Maven, quoted from the Benefits of using Maven page:

Henning

  • quick project setup, no complicated build.xml files, just a POM and go
  • all developers in a project use the same jar dependencies due to centralized POM.
  • getting a number of reports and metrics for a project "for free"
  • reduce the size of source distributions, because jars can be pulled from a central location

Emmanuel Venisse

  • a lot of goals are available so it isn't necessary to develop some specific build process part contrary to ANT we can reuse existing ANT tasks in build process with antrun plugin

Jesse Mcconnell

  • Promotes modular design of code. by making it simple to manage mulitple projects it allows the design to be laid out into muliple logical parts, weaving these parts together through the use of dependency tracking in pom files.
  • Enforces modular design of code. it is easy to pay lipservice to modular code, but when the code is in seperate compiling projects it is impossible to cross pollinate references between modules of code unless you specifically allow for it in your dependency management... there is no 'I'll just do this now and fix it later' implementations.
  • Dependency Management is clearly declared. with the dependency management mechanism you have to try to screw up your jar versioning...there is none of the classic problem of 'which version of this vendor jar is this?' And setting it up on an existing project rips the top off of the existing mess if it exists when you are forced to make 'unknown' versions in your repository to get things up and running...that or lie to yourself that you know the actual version of ABC.jar.
  • strong typed life cycle there is a strong defined lifecycle that a software system goes thru from the initiation of a build to the end... and the users are allowed to mix and match their system to the lifecycle instead of cobble together their own lifecycle.. this has the additional benefit of allowing people to move from one project to another and speak using the same vocabulary in terms of software building

Vincent Massol

  • Greater momentum: Ant is now legacy and not moving fast ahead. Maven is forging ahead fast and there's a potential of having lots of high-value tools around Maven (CI, Dashboard project, IDE integration, etc).

8. Have u created any job in Jenkins to run your script?

Yes as a part of continuous integration and the post build action I have created many smoke testing job. here are the steps

9. If u cannot find xpath of any element uniquely then how u can find that elements.?

If you are not able to find the xpath of an element then it is the possibility that the element may be in some frame below steps you can perform to identify the element

  1. Switch to the frame where the element it
  2. then try to identify the element using either Xpath or CSS.

10. What are the different methods in xpath access?

You can read about xpath and its types here

That's it for this article. If you have any question with selenium, Cucumber, Appium framework development. I am more than happy to help. Feel free to put in the comment section.


** If you see I am helping community then please help to endorse my skill set so that community can be benefited **


要查看或添加评论,请登录

Hemant Varhekar的更多文章

社区洞察

其他会员也浏览了