Top 25+ Struts Interview Questions & Answers [ JAVA TRICKS ] |ACTE
Struts Interview Questions and Answers

Top 25+ Struts Interview Questions & Answers [ JAVA TRICKS ]

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Dhamodharan (Sr Technical Manager )

High level Domain Expert in TOP MNCs with 8+ Years of Experience. Also, Handled Around 20+ Projects and Shared his Knowledge by Writing these Blogs for us.

(5.0) | 15212 Ratings 2217
  • These Struts Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Struts .
  • As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer.

1. What is Struts?

Ans:

Struts are the nothing but open source framework mostly used for making a web application whenever the term framework means it comprises JSP, servlet, custom tags message resources all in one bundle which makes a developer task very easy.

2. What are the main classes used in struts application?

Ans:

Main classes in the Struts Framework are:

  • Action servlet: It’s backbone of web application, it’s controller class responsible for handling an entire request.
  • Action class: Using Action classes all business logic is developed using a call model of the application also.
  • Action Form: it’s javabean which represents the forms associated with action mapping. And it also maintains a session state whose object is automatically populated on a server side with data entered from form on a client side.
  • Action Mapping: Using this class do the mapping between the object and Action.
  • ActionForward:This class in the Struts is used to forward result from controller to destination.

3. How exceptions are handled in Struts application?

Ans:

There are two ways of handling exception
  • Programmatically handling: using a try {} catch block in code where exception can come and flow of code is also decided by a programmer .its normal java language concept.
  • Declarative handling: There are the two ways again either define tag inside a struts-config.XML file

4. How validation is performed in struts application?

Ans:

  • Validator-rules.xml file: which contains a default struts pluggable validator definitions. And can add new validation rules by adding entries in this file. This was the original beauty of struts which makes it more configurable.

  • Validation.xml files: which contain the details regarding validation routines that are applied to different Form Beans. To associate more than one validation rule to the property can specify a comma-delimited list of values. The first rule in the list will be checked first and then next rule and so on.

5. What is the Difference between DispatchAction and LookupDispatchAction in Struts Framework?

Ans:

Suitable for key-value pair-based action mapping

  Feature DispatchAction LookupDispatchAction
Method Mapping

Maps actions to methods using request parameters

Maps actions to methods with a Hashmap
Method Signature Standard signature with fixed method names Specific method signatures for each action
Action Mapping Based on a HashMap in’struts-config.xml Based on request parameters in `struts-config.xml
Usage Scenario Suitable for parameter-based action distinction Suitable for key-value pair-based action mapping

6. How can I retrieve a value which is set in the JSP Page in case of DynaActionForm?

Ans:

DynaActionForm is the subclass of ActionForm that allows creation of form beans with the dynamic sets of properties, without requiring the developer to create a Java class for every type of form bean.

DynaActionForm eliminates the need of FormBean class and now form bean definition can be written into a struts-config.XML file.

So, it makes FormBean declarative and this helps programmers to reduce development time.

7. What is MVC?

Ans:

    MVC stands for a Model, View, and Controller and is called Software Design Pattern for developing web applications.
  • Model: Model is responsible for maintaining a State of Data and Business logic of application
  • View: View is responsible to show all the data to use i.e. it shows presentation.
  • Controller: Controller acts as an interface between the View and Model. It intercepts all requests
MVC

8. What configuration files are used in Struts?

Ans:

  • struts.xml:
  • This is the main configuration file for Struts 2. It is used to define configuration settings for the entire framework. It includes the details such as action mappings, result types, interceptors, and more.
  • web.xml:
  • The standard deployment descriptor for the Java web application. In the context of Struts, it is used to configure FilterDispatcher, which is responsible for intercepting requests and passing them to appropriate actions.

9. What configuration files are used in Struts?

Ans:

  • When a request comes in from a Java Server Page (JSP), the ActionServlet, aided by the struts-config XML file, detects the corresponding form bean and invokes its ‘validate()’ method.
  • This method evaluates other field criteria and examines if all required fields are filled up. If there are any issues, the form bean generates ActionErrors.
  • If validation is successful, control is passed to the appropriate Action class, which executes business logic before proceeding to the next phase.

10. What is Struts Framework? What are its Components?

Ans:

Struts is the type of Web Application Development Framework that provides the suitable platform for developing web applications. Struts include the Servlets, JSP, Custom tags and Message resources into the unified framework.

11. Why to use Struts?

Ans:

As Struts is based on the MVC architecture i.e. Model, View, Controller, it separates Business Logic, Design & Controller, as a result of which it makes code more simple, maintainable and readable.

12. Which library is provided by Struts ?

Ans:

    Struts provide the HTML Tags library which can be used for adding form elements are:
  • Text fields
  • Text boxes
  • Radio buttons

13. What are Interceptors?

Ans:

Interceptors are objects that provide the pre-processing logic before action is called or provide the post-processing logic after action is called.

Interceptors can be used to perform the various operations like Validations, Exception Handling, File Uploading, Displaying intermediate results, etc.

14. What are the new features of Struts2?

Ans:

    Struts2 has JSP, Free marker, and Valocity for a view component.

  • In Struts2, Front Controller is the StrutsPrepareAndExecuteFilter.
  • In Struts2, configuration file name must be struts.xml and should be placed inside a classes directory.
  • Struts2 uses concept of Interceptors while processing request.

15.What are Life Cycle methods of Interceptor?

Ans:

There are three life cycle methods of Interceptor are:

  • init () method
  • intercept () method
  • destroy () method

16. How is request handled in Struts2 Application?

Ans:

Firstly, requests received are sent to the server by the user. Then the request is handled by FilterDispatcher that selects appropriate action for it. The defined interceptors perform pre-processing operations are file upload, exception handling, etc.

Now selected action is executed and operation is performed. Again defined interceptors perform post-processing operations are file upload, exception handling, etc. The final result is displayed in view page.

17. What is the function of Struts.xml File in Struts?

Ans:

In the struts.xml file, the user can define all the mapping to actions so that particular action is called when a particular operation is performed.

It is also called as a configuration file and is present under the WEB-INF/classes folder.

18. Which Configuration Files are used in Struts?

Ans:

The configurations files used in the Struts include:

  • ApplicationResource.properties.
  • Struts-config.xml.

19. What are conditions for actionForm to work correctly?

Ans:

ActionForm must fulfill the following conditions to work correctly:

  • It must have the no argument constructor.
  • It should have a public getter and setter methods for all properties.

20. What is Value Stack?

Ans:

A Value Stack can be explained as the stack that contains requirement specific objects. The action stays at the top of the stack while executing.

The objects are placed in the Value Stack and users can perform SQL operations on it.

    Subscribe For Free Demo

    [custom_views_post_title]

    21. What are various methods of Value Stack ?

    Ans:

    • FindString (): Used to find strings from a given expression.
    • FindValue (): Used to find a value from a given expression.
    • Peek (): It gives objects located at the top of the stack.
    • Pop (): It gives an object located at the top of the stack and removes it.
    • Push (): It pushes objects to the top of the stack.

    22. What is meant by Action Context?

    Ans:

    The Action Context is the object container in which actions are executed. The values are stored in the Action Context are unique per thread (i.e. Thread Local), as a result of which, and don’t need to make the action thread-safe.

    By calling the getContext() method of the ActionContext class, you can get a reference to ActionContext.It is the static factory method.

    23. What is the use of ActionInvocation?

    Ans:

    The ActionInvocation is used to represent an action’s execution state.

    It holds an action and the interceptor object.

    24. What is the use of ActionInvocation?

    Ans:

    Object Graph Navigation Language (OGNL) is a strong expression language. It helps to simplify accessibility of data stored in ActionContext. OGNL supports the interacting with collections i.e. Map, List, and Set.

    The struts framework helps to set ValueStack as a root object of OGNL. The action object is pushed into ValueStack and can directly access the action property.

    25. What are the types of constants present in Action Interface?

    Ans:

    There are five types of constants provided by Action Interface. They are,

    • Login
    • Input
    • Success
    • Error
    • None

    26. What are different types of tags in Struts2?

    Ans:

    Types of tags in Struts2

    27. How can I create Action Classes in Struts2?

    Ans:

    • Using the Strts2 @Action annotation.
    • Extend ActionSupport class.
    • By implementing an Action Interface.

    28. What are Types of Tag Libraries in Struts?

    Ans:

    • Bean Tag Library: Used for the accessing Java Beans and its properties.
    • Nested Tag Library: Provides ability to use nested beans in application.
    • Logic Tag Library: Used for giving required output, iteration capability and flow management.
    • HTML Tag Library: Helps to get required HTML output.
    • Tiles Tag library: Used in the applications that have tiles.

    29. What are different types of Struts Actions?

    Ans:

    • Forward Action: With this class, can control the Struts controller and its functionality, without having to rewrite an existing Servlets.
    • Include Action: Using the IncludeAction class to include another resource in response to a c request being processed.
    • Switch Action: Used to switch a resource in one module to the other resource in another module.
    • Dispatch Action: Used to combine related actions into the single class.
    • LookUpAction: Used to drive action with a key if the action name is not working.

    30. What is meant by Internationalisation?

    Ans:

    Internationalisation (i18n) is an interceptor that is used for planning and implementing the products and services so that they can be easily adapted to specific local languages and cultures i.e. a process called localization.

    It handles the setting locale for action. It can be used if the user wants to set his/her locale and get data according to the locale provided.

    31. What are Core Components of Struts2?

    Ans:

    • Interceptors
    • Value Stack
    • Action Context
    • OGNL
    • ActionInvocation

    32. How can I create a Custom Interceptor?

    Ans:

    To create the custom interceptor by implementing Interceptor interface in the class and overriding its three life cycle methods i.e. init (), Destroy (), Intercept (). It can also be created by defining the entry of the interceptor in a struts.xml file.

    33. How are ValueStack and OGNL linked?

    Ans:

    OGNL is the library through which ValueStack data or values are manipulated whereas a ValueStack is a stack where all values and data related to the actions are stored.

    34. What are two different validations that Validator Framework supports?

    Ans:

    For purpose of Validation of form data, Validator framework is used. The two different validations are:

    • Client-Side Validation
    • Server-Side Validation

    35. How to control submission of duplicate forms in Struts?

    Ans:

    In Struts, two different methods are used in the order to stop submission of duplicate forms.
    These methods are provided by action class:

    • saveToken() is a first method that is provided by action class for generating the unique token that is further saved under user’s session.
    • isTokenValid() is the another method that is used while one needs to check uniqueness of a tokens.

    36. Describe benefits of Struts framework.

    Ans:

    The Struts framework is completely working on the MVC architecture. This ensures that different layers of Struts are separated properly which further ensures a development and customization of the application easy. Because files of different configurations are used thus configuration of applications also becomes easy. Struts framework is also open-source software and thus best part, it is cost-effective!

    37. What is ForwardAction used for?

    Ans:

    To combine an existing application with the struts, it needs to use the ForwardAction. ForwardAction is also used whenever one wants to transfer complete control from one place to another, say, JSP to the local server. ForwardAction is also used when one wants to obtain benefits of the functionality of struts after integration with Struts. In this case, Servlets are never written again. Another use of ForwardAction is when a request is forwarded to other resources.

    Course Curriculum

    Learn Struts Certification Course to Build Your Skills & Career

    Weekday / Weekend BatchesSee Batch Details

    38. How to use resource bundle?

    Ans:

    In order to define a certain error messages resource bundle. The properties file is required. It is done in the input value pairs. This is done for checking all the errors in whole coding that may have slipped. This way it is ensured that a code is clean since the developer no longer has to worry about embedded error messages in a code.

    39. What is Apache Struts ?

    Ans:

    The Apache Struts framework is an open-source framework for developing web applications in Java. It follows Model-View-Controller (MVC) architectural pattern and provides the set of components and tools to build scalable and maintainable web applications.

    40. Describe the two types of Form beans?

    Ans:

    There are two different types of the Form beans:

    • Request Scope: When a Scope type is requested, the values of form beans are available with the current request.
    • Session Scope: When a scope type is a session, the values of a form bean are found for all requests in a recent session.

    41. How to migrate an application from “Strut 1” to “Strut 2”?

    Ans:

    There are multiple steps for migration of applications from strut 1 to strut 2.
    The steps are:

    • Firstly, move Strut 1 Action form.
    • After moving it, place it in the Strut 2 POJO.

    42. Name the different technologies for View Layer?

    Ans:

    There are many different technologies used in view layer. Are:

    • JSP
    • XML/XSLT
    • Velocity Templates
    • HTML
    • WML Files
    • Servlets

    43. What is Dispatch action and how do use it?

    Ans:

    The Dispatch action is responsible for allowing programmers to combine two related functions or classes. With help of this action, the programmer can also combine two similar actions and make one major or User action. It can be used for creating the class for extending the action. It can also be used for addition of methods with a similar signature to the execute method.

    44. Describe drawbacks of Struts framework?

    Ans:

    There is an absence of a flow mechanism in backward direction.
    This uses only a one controller servlet.
    There is no exception found in the framework.
    The Struts Framework is not more transparent.
    The documentation is bad in the case of struts framework.

    45. What is meant by Action Errors?

    Ans:

    During the submission or fill-up of a form, if a client or user makes a mistake in the data for the application that is known as the Action Error. The client or user is solely responsible for them. They should check as early as possible. If they are not detected fast, it will waste server time and have a bad effect on the quality of codes.

    46. State differences between Struts 1 and Struts 2?

    Ans:

    The controllers used by both the Struts are different, ActionServlet is used by Strut 1 and Filter by Strut 2.

    For mapping forms (JSP), Struts1 uses ActionForm. However, in case of Struts 2, no such ActionForm is available.

    In the case of a Strut 1 for validation of data, Validation () the method is used but for a Strut 2 it is done by a Validation framework.

    47. Mention steps for combining Velocity templates and Struts.?s the flow of requests in Struts based applications?

    Ans:

    • Then I need to make a web.xml for identifying a Velocity servlet.
    • In WEB-INF directory, have to choose velocity toolbox.xml
    • In order to point the view of struts-config from JSPs to velocity templates, they need modifications.
    • For every page that needs to be rendered, create a velocity template.

    48. How can I show validation errors on the JSP page?

    Ans:

    These are errors that appear when a client or user enters wrong or invalid data for filling up an application. At that moment, for validation, the method Validator() is used which works for validation on both sides.

    49.  Name the different actions found in Struts.?e role of Action Class in Struts?

    Ans:

    • ForwardAction
    • IncludeAction
    • DispatchAction
    • LookupDispatchAction
    • SwitchAction
    • 50. What is LookupDispatchAction?

      Ans:

      This is the subclass under the DispatchAction class. This is required for calling actual methods. For using the LookupDispatchAction, you need a certain set of rules and methods. This controls the forward mechanism by sending requests to the proper resource.

      51. What are the key classes of Struts application?

      Ans:

      • Action Servlet: It is a controller class which is in charge of all the requests that come in.
      • Action Class: All business logic, often known as Model, is constructed using Action class.
      • Action Form: It is a Java bean that connects one or more Action Mappings. It keeps the web application’s session state safe.
      • Action Mapping: can do the mapping between the Object and Action using it.
      • Action Forward: It’s utilised to send Controller’s result toa target.

      52. What is MVC architecture in Struts framework?

      Ans:

      MVC stands for a Model View Controller.

      • To store, retrieve, and manipulate data, the model contains a business logic and interacts with persistence storage.
      • The view is in charge of returning results to the user. JSP is used to implement the view layer in Struts.
      • The controller handles all of the user’s requests and returns relevant views. The ActionServlet performs the controller’s function in Struts.

      53. What is execAndWait interceptor?

      Ans:

      For long-running action classes, Struts2 introduces execAndWait interceptor. can use this interceptor to provide the client with an interim response page, and once processing is complete, the client will receive the final response. The ExecuteAndWaitInterceptor class implements this interceptor, which is described in a struts-default package.

      54. What is the first step to start using struts application?

      Ans:

      To use the framework, only need to include the struts.jar file in the development environment. After a jar file is in the CLASSPATH, may use the framework and build Strut-based apps.

      55. What is ForwardAction in Struts?

      Ans:

      ForwardAction is applied when combining the existing application with struts. ForwardAction is also used for transferring total control from one location to another, such as from JSP to a local server. When benefits of struts functionality are desired after integration with the Struts, ForwardAction is employed.

       56. How many servlet controllers does Struts application use?

      Ans:

      The Struts framework uses the centralised control model, with the single servlet controller controlling the entire application. As a result, a servlet application only needs a one servlet controller.

       57. How does Struts 2 handle the request?

      Ans:

      • The user first sends a received request to a server.
      • The request is handled by FilterDispatcher, which chooses the best action for it.
      • Pre-processing actions are file upload, error handling, and so on are performed by designated interceptors.
      • The selected action is now carried out, and operation is completed.
      • Interceptors used to execute post-processing actions are file upload, exception handling, and so on.
      • The user is presented with the final result in the form of a view page.

      58. What is the struts-default package?

      Ans:

      The struts-default package defines all of Struts2 interceptors, as well as the most often used interceptor stack. To prevent having to configure the interceptors twice, it’s best to extend this package while configuring the application package. This is given to aid developers in a configuration of interceptors and result pages in the application.

       59. Describe functionality of token interceptor in Struts 2.?

      Ans:

      The most common issue with the web applications is a double form submission, which results in the user being charged twice and the database retaining double values. To solve the problem of double form submission, you can use a token interceptor. The struts-default package defines an interceptor.

       60. What are tiles in Struts application?

      Ans:

      Tiles are a type of presentation component that can be reused. Create the basic layout with the several sections before using Tiles. Then, in the external configuration file, define the JSP page that should occupy the correct sections.

       61. What are ActionServlets?

      Ans:

      ActionServlet is equal to controller in the MVC architecture for web apps. Requests to a server are routed to the controller, which is in charge of request management. The typical struts flow starts with ActionServlet and calls the RequestProcessor’s process() method.

      62. Why is ActionServlet singleton in Struts?

      Ans:

      ActionServlet is the controller in the Struts framework, and it manages all the user requests. Because only one object needs to be produced for the controller class, ActionServlet is built on a singleton design pattern. For each user request, many threads are formed subsequently.

      63. When to use the SwitchAction class?

      Ans:

      When having a modular application with the various modules working independently, the optimum situation for using the SwitchAction class is. And can transition from a resource in one module to another resource in the separate module of the application using SwitchAction class.

      64. How to handle exceptions in Struts2?

      Ans:

      Struts2 has a highly comprehensive framework for handling exceptions. Packages can define global outcomes, and then specific exceptions can be mapped to these result pages. Exception mapping can be performed at both global package and action levels.

      65. Difference between simple HTML tags and struts-specific HTML tags.?

      Ans:

      • HTML tags are the static by nature, while Struts-specific HTML tags are the dynamic.
      • Although HTML is coordinated in Struts, Struts has its own tag libraries.
      • The tags for a HTML, on other hand, cannot be user-defined, whereas a tags for struts can.

      66. What happens when a client browser issues an HTTP request?

      Ans:

      • The request is received by an ActionServlet.
      • Details on Actions, ActionForms, ActionMappings, and ActionForwards can be found in a struts-config.xml file.
      • The ActionServelet reads struts-config.xml file and builds the database of configuration objects when it starts up. Later, when processing requests, the ActionServlet refers to an object to make a decision.

      67. Which file does the controller use to get request routing mapping information?

      Ans:

      The controller gets all the mapping information from a configuration file called struts-config.xml before deciding which action to employ for routing the user’s request. It acts as the network router, processing and mapping requests to an appropriate action or resource.

      68. What is the difference between field and plain validators?

      Ans:

      • Action level validators can utilise plain-validators syntax. In this instance, a single validator can be used to validate the many fields. However, the drawback of this technique is that you can’t use the many validators on a single field.
      • The field-level validation can use field-validator syntax. The Multiple validators can be applied to the single field in this case. However, unlike a plain-validator, this technique has the drawback of not being able to apply a single validator to several fields.

      Q69. Difference between Actionform and dform.

      Ans:

        ActionForm:
      • An HTML form for user interaction is represented by ActionForm.
      • Provides typed properties for form state with getters and setters.
      • Allows for neat package organization.
      • Serves as a firewall by isolating and enclosing HTTP request parameters.
      • Allows for compile-time validation of form fields.
      • DynaActionForm:
      • Declares form state properties in struts-config.xml.
      • Causes XML-based definition, which results in config file bloat.
      • Inadequate type leads to runtime difficulties and redeployment.
      • Organizes properties in the Struts Config file in a flat manner.
      • Allows property access in the same way that’request.getParameter()’ does.

      70. What is Mapping Dispatch?

      Ans:

      An abstract Action that dispatches to the public method that is named by a request parameter whose name is specified by a parameter property of corresponding ActionMapping. This Action is useful for the developers who prefer to combine the many similar actions into single Action class, in order to simplify application design.Struts MappingDispatch Action is one of the Built-in Actions provided along with struts framework.This class enables the user to collect related functions into single action class. It needs to create multiple independent actions for each function.

       71. Explain about token features in struts?

      Ans:

      The problem of duplicate form of submission arises when the user clicks the Submit button more than once before a response is sent back. This may result in inconsistent transactions and must be avoided. In Struts this problem can be handled by using saveToken() and isTokenValid() methods of the Action class. saveToken() method creates the token and saves that in the user’s current session, while isTokenValid() checks if the token stored in the user’s current session is the same as that which was passed as the request parameter.

      72. What are steps of Struts Installation?

      Ans:

      In order to use a Struts framework, only need to add Struts.Jar file in the development environment. Once jar file is available in a CLASSPATH, and can use the framework and develop a Strut based applications.

       73. How duplicate form submission can be controlled in Struts?

      Ans:

      In Struts, action class provides the two important methods which can be used to avoid the duplicate form submissions.

      • saveToken() method of the action class generates the unique token and saves it in the user’s session.
      • isTokenValid() method is used to check the uniqueness of tokens.

      74.What is Execute method of action class?

      Ans:

      The Execution method of the action class is responsible for the execution of business logic. If any processing is required on a user’s request, it’s performed in this method. This method returns the actionForward object which routes the application to the appropriate page.

      75. How client side validation is enabled on JSP form?

      Ans:

      In order to enable the client side validation in Struts, first need to enable a validator plug-in in struts-config.xml file. This is done by adding the configuration entries in this file.

      76. What are design patterns used in struts.?

      Ans:

      Struts is based on the model 2 MVC (Model-View-Controller) architecture. Struts controller uses command design pattern and action classes use the adapter design pattern. The process() method of RequestProcessor uses template method design pattern. Struts also implement following J2EE design patterns.

      • Service to Worker
      • Dispatcher View
      • Composite View (Struts Tiles)
      • Front Controller
      • View Helper
      • Synchronizer Token

      77. Is Struts efficient?

      Ans:

      The Struts is not only thread-safe but thread-dependent instantiates each Action once and allows the other requests to be threaded through the original object.

      • ActionForm beans minimise a subclass code and shorten a subclass hierarchies
      • The Struts tag libraries provide a general-purpose functionality
      • The Struts components are reusable by application
      • The Struts localization strategies reduce need for redundant JSPs
      • The Struts is designed with the open architecture–subclass available
      • The Struts is lightweight
      • The Struts is an open source and well documented (code to be examined easily)
      • The Struts is a model neutral.

      78. What is struts.dev Mode?

      Ans:

      The struts.dev Mode is utilised to ensure that the system is running in development mode or production mode by setting true or false. Struts.dev Mode is the set to false production stage to diminish the effect of execution.

       79. What is meant by a custom tag?

      Ans:

      Custom Tags can be depicted as Java classes, which are written by the designers, which can be utilised as part of the JSP utilising the XML markup. Custom tags can be considered as class, which goes about as a view partner beans that can be put into the utilisation without scriptlets, which are the Java code snippets mixed with the JSP markup.

      JAVA Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

      80. What are various bundled validators?

      Ans:

      • Requiredstring
      • email
      • regex
      • Stringlength
      • double
      • int
      • url
      • date

      81. What are two scope types for form beans?

      Ans:

      • Request Scope: Form Bean values are the available in a current request only
      • Session Scope: Form Bean values are available for all requests in a current session.

      82. Is Struts thread safe?

      Ans:

      Yes Struts are thread safe. In Struts, a new servlet object is not required to handle each request; rather a new thread of action class object is used for each new request.

       83. What Are Tools Used In Debugging?

      Ans:

      Generally use logs to see the cause of the issue, where a failure is occurring. So for iOS – iPhone configuration utility & for Android Monitor.bat, etc can be used. To provide logs from these tools to a developer, can easily understand the cause of the issue.

      84. Mention Few Disadvantages of Automation Testing?

      Ans:

      Designing tools and tests to run software takes a lot of manual, human effort, though there are frameworks and tests ready-made for an engineer to use.

      Even with automated testing, human error is still a factor – tools can be buggy, inefficient, costly, and sometimes even technologically limited in what kinds of tests can run on their own.

      85. What Are Prerequisites To Start Automation Testing?

      Ans:

      The first step is to segregate different test cases that are to be automated. Following this, must prepare test data as per the needs of test cases.

      Reusable functions need to be written which are frequently used in test cases. Later test scripts are prepared by using the reusable functions and applying the loops and conditions wherever necessary.

      Q86. What Are Differences Between Open Source Tools, Vendor Tools, And In-house Tools?

      Ans:

      Open source tools are free to use frameworks and applications.

      • Engineers build tools and have source code available for free on the internet for other engineers to use.
      • Vendor tools are developed by the companies that come with the licences to use, and often cost money.
      • Since they are developed by outside sources, technical support is often available for use.
      • Example: vendor tools include the WinRunner, SilkTest, Rational Robot, QA Director, QTP, LR, QC, RFT, and RPT.

      87. Is Automation Testing Complete Replacement For Manual Software Testing?

      Ans:

      No. Proper automation requires as little intervention from humans as possible since tools used are built to run the tests once they are set up.

      As convenient as this might be, it should not be a complete replacement for manual testing – only for repetitive tasks like load testing, where thousands of virtual users are required.

      Engineers should not automate things like test scripts if scripts can only be expected to run occasionally, nor should they automate code reviews, or bug testing for new builds of software that require human interaction to detect the issues. And can conclude by saying that large-scale, repetitive tasks are a better fit for automation.

      88. When should be opt for Struts Framework?

      Ans:

      • A More robust enterprise level application development is required.
      • A reusable, highly configurable application is more required.
      • A loosely coupled, MVC based application is required with the clear segregation of different layers.

      89. What is inner class and anonymous class?

      Ans:

        Inner class:
      • classes that are characterised by different classes.
      • The setting is the relationship performed between two different classes.
      • An inner class can get to the private members and information.
      • Inner classes have a two advantages:
      • Name control
      • Access control
      • Anonymous class:
      • This class is the class characterised inside technique without a name.
      • It is instantiated and pronounced in the similar strategy.
      • It doesn’t have an explicit constructors

      90. Mention Few Disadvantages of Automation Testing.

      Ans:

        validate() Method:
      • Validates properties after population.
      • Called before passing the `FormBean` to an `Action`.
      • Returns a collection of `ActionError` for error handling.
      • reset() Method:
      • Resets the form’s state to initial values.
      • Used for cleanup and preparing for reuse.
      • Ensures consistency and default property values.

    Are you looking training with Right Jobs?

    Contact Us
    Get Training Quote for Free