Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

XML Element to declare a bean implemented by Groovy

A. lang:groovy
B. lang:jruby
C. beanscript:jruby
D. script:jruby
Answer» B. lang:jruby
2.

XML element to specify the property values for scripting bean

A. lang:property
B. bean:property
C. script:property
D. None of the mentioned
Answer» B. bean:property
3.

XML Element to declare a bean implemented by JRuby

A. lang:jruby
B. aop:jruby
C. beanscript:jruby
D. script:jruby
Answer» B. aop:jruby
4.

In Ruby instance variable begins with

A. #
B. *
C. @
D. None of the mentioned
Answer» D. None of the mentioned
5.

Lightweight java scripting language executing java fragments

A. JRuby
B. Groovy
C. BeanShell
D. All of the mentioned
Answer» D. All of the mentioned
6.

Dynamic Language for java platform to cope up with other languages

A. JRuby
B. Groovy
C. BeanShell
D. All of the mentioned
Answer» C. BeanShell
7.

Scripting language based on Ruby

A. JRuby
B. Groovy
C. BeanShell
D. All of the mentioned
Answer» B. Groovy
8.

Scripting languages supported by Spring?

A. JRuby
B. Groovy
C. BeanShell
D. All of the mentioned
Answer» E.
9.

Spring includes AnnotationBeanConfigurerAspect in its aspect library for configuring the dependencies of any objects

A. True
B. False
Answer» B. False
10.

Which scope does @Configurable instantiated class looks for?

A. Singleton
B. Prototype
C. None of the mentioned
D. All of the mentioned
Answer» C. None of the mentioned
11.

We can directly use Spring AOP for injection of beans

A. True
B. False
Answer» C.
12.

How to inject Spring bean into domain objects

A. AOP
B. XML
C. AspectJ
D. Java Based
Answer» B. XML
13.

Objects created outside the container:-

A. Domain Objects
B. User Objects
C. SpringVisitor Objects
D. None of the mentioned
Answer» B. User Objects
14.

Library to use AspectJ weaver

A. spring-instrument.jar
B. spring-introduction.jar
C. spring-aop.jar
D. spring-weave.jar
Answer» B. spring-introduction.jar
15.

You also have to include suitable load-time weaver’s configuration in XML

A. True
B. False
Answer» C.
16.

XML Element to include load-time weaver

A. aop:config
B. aop:auto-wire
C. context:load-time-weaver
D. aop:load-time-weaver
Answer» D. aop:load-time-weaver
17.

How to weave your classes using argument while compiling?

A. -javaagent:CLASSPATH
B. -javaagent:PackgePath
C. -javaweave:CLASSPATH
D. -javaweave:PackagePath
Answer» B. -javaagent:PackgePath
18.

Name of the process when targe classes are loaded into JVM

A. load-time weaving
B. process-time weaving
C. load-process weaving
D. process-delivery weaving
Answer» B. process-time weaving
19.

Special compiler used during weaving

A. jvm
B. gcc
C. ajc
D. none of the mentioned
Answer» D. none of the mentioned
20.

Applying aspects to your target objects

A. AspectJ Annotation
B. Weaving
C. All of the mentioned
D. None of the mentioned
Answer» C. All of the mentioned
21.

What are the ways to declare an advice?

A. pointcut-ref attribute
B. pointcut attribute
C. all of the mentioned
D. none of the mentioned
Answer» D. none of the mentioned
22.

Tag which defined Spring AOP configurations

A. aop:config
B. aop:configregister
C. aop:configbeans
D. None of the mentioned
Answer» B. aop:configregister
23.

Tag used to enable AspectJ annotation?

A. Introduction
B. aop:aspectj-autowire
C. aop:aspectj-autoproxy
D. AfterSpecial
Answer» D. AfterSpecial
24.

Tag used to declare aspects

A. aop:config
B. aop:auto-proxy
C. aop:autowire
D. None of the mentioned
Answer» B. aop:auto-proxy
25.

How to introduce counter field to original bean class?

A. Using Spring AOP
B. Implementing interface
C. AspectJ Pointcut
D. None of the mentioned
Answer» B. Implementing interface
26.

How to keep track of the usage of your beans

A. Calling Count
B. Last modified date
C. New Interface to your object
D. All of the mentioned
Answer» E.
27.

Attribute used to specify implementation class

A. no such attribute
B. defaultImpl
C. defaultInterface
D. defaultImplement
Answer» C. defaultInterface
28.

Target Classes can be denoted by Introduction Annotation

A. True
B. False
Answer» B. False
29.

Annotation used to declare an introduction

A. Before
B. After
C. @DeclareParents
D. None of the mentioned
Answer» D. None of the mentioned
30.

How does an Introduction advice do this in Spring?

A. dynamic proxy
B. web proxy
C. implements org.springframework.net.bundle interface
D. none of the mentioned
Answer» B. web proxy
31.

In introduction advice you have to modify class to introduce new methods

A. True
B. False
Answer» C.
32.

Introduction advice helps in implementing multiple inheritance

A. True
B. False
Answer» B. False
33.

Which special type of advice is used to implement an interface?

A. Introduction
B. Before
C. After
D. AfterSpecial
Answer» B. Before
34.

Pointcut used to parse an AspectJ pointcut expression string

A. org.springframework.aop.aspectj.AspectJExpressionPointcut
B. org.springframework.aop.aspectj.AspectJExpressionPointcutString
C. org.springframework.aop.aspectj.AspectJExpressionString
D. org.springframework.aop.aspectj.AspectJPointcuttoString
Answer» B. org.springframework.aop.aspectj.AspectJExpressionPointcutString
35.

Pointcuts can be composed using:-

A. org.springframework.aop.support.Pointcuts class
B. composablePointcut class
C. all of the mentioned
D. none of the mentioned
Answer» D. none of the mentioned
36.

Spring supports operations on pointcuts:-

A. notably
B. union
C. intersection
D. all of the mentioned
Answer» E.
37.

Method which checks if all target classes are matched

A. matches()
B. pair()
C. matchTargetClass()
D. none of the mentioned
Answer» B. pair()
38.

Are logical operators valid in pointcut expressions?

A. Yes
B. No
Answer» B. No
39.

Expressions which returns Parameters of pointcuts?

A. target
B. args
C. none of the mentioned
D. all of the mentioned
Answer» E.
40.

Bean name patterns are supported by all configurations(XML,Java,AspectJ)

A. True
B. False
Answer» C.
41.

Which of the following pattern is used to match bean name?

A. bean(*Calculator)
B. bean(Calculator)
C. bean(com.appress.spring.Calculator)
D. None of the mentioned
Answer» B. bean(Calculator)
42.

The annotations must be added to the implementation class but not the interface

A. True
B. False
Answer» B. False
43.

Is the following pointcut expression correct? execution(* ArithmeticCalculator.*(..))

A. Yes
B. No
C. If every target class is in same package
D. Depends where target class is located
Answer» D. Depends where target class is located
44.

Spring AOP only supports method execution join points for the beans in its IoC container

A. True
B. False
Answer» B. False
45.

Language used to set various kinds of join points

A. AspectJ pointcut language
B. Java pointcut language
C. XML pointcut language
D. None of the mentioned
Answer» B. Java pointcut language
46.

Annotation used to refer poincuts?

A. @Pointcut
B. @PointcutExecution
C. @PointcutBefore
D. None of the mentioned
Answer» B. @PointcutExecution
47.

PointCut definitions can’t be reused again

A. True
B. False
Answer» C.
48.

Which tag in XML is used to declare @Before advice’s method?

A. aop:before
B. aop:after
C. aop:afterthrow
D. None of the mentioned
Answer» B. aop:after
49.

Which instantiation model is supported by AspectJ?

A. perthis
B. pertarget
C. none of the mentioned
D. all of the mentioned
Answer» E.
50.

Method which returns the highest priority of aspect’s join point?

A. getHighestPriority
B. getOrder
C. getHighOrder
D. getPriority
Answer» C. getHighOrder