You are on page 1of 18

1) Which of the following field/column for requirements in excel format is used

to map the requirements folder in ALM?


Ans: Path
2) Which of the following best defines ALM as an integrated repository?
Ans: Link between requirements with releases & cycles
Link between defects with releases & cycles
3) By default, what does application life cycle management (ALM) assign when a
new defect is created?
Ans: A unique defect IO
4) Which of the following sections allows you to view coverage by cycle?
Ans: Requirement coverage
5) How many defects can be associated with a requirement?
Ans: Multiple defects
6) Which of the following elements of JMeter determines the order in which the
requests have to get processed?
Ans: Logic controllers
7) Which one of the following is not a controller in JMeter?
Ans: Condition controller
8) Which of the following represents a process where samplers are executes with
multiple sets of user input data?
Ans: Parameterization
9) Which of the following statements is true about pre-processors?
Ans: Pre-processors execute before the sampler requests are executed in the
test plan (only a)
10) Which assertion is used to test whether the API server response was
received within a given amount of time or not?
Ans: Duration
11) Which of the following defect states is marked by the developer when he is
analyzing the defect description?
Ans: Open
12) Which of the following test defines “Verification” & “Validation”?
Ans: Verification: Lalitha is reviewing the test script conduct by raju
Validation: Raju is updating the requirements traceability matrix for the
requirement coverage
13) John has raised a high priority defect in the morning and is waiting for the
fix to be completed. At 5pm he got a fix from the developer. Now he also need
to check the fix implemented does not introduce any new defects on the
system. What type of testing is he performing?
Ans: Regression testing
14) Consider the below html code snippet
Email:<label id=”Email” class=”Style1” name=”input”> Which of the best locator
to identify the Email web element?
Ans: By id (“Email”)
15) Which method in the web driver library is used to get the attribute value of
a web element?
Ans: getAttribute(“AttributeName”)
16) Sarah is coding an automation script, where she has to validate the price of
the holiday package based on the drag and drop of island only from the menu.
The price is fetched from the server and displays without reloading the
webpage. Which web driver library class has the pre defined conditions for
handling dynamic waits in selenium webdriver library?
Ans: WebDriver wait
17) Which of the following statement(s) is/are about the extent reports?
Ans: All of the above : Extent reports are customisable HTML Reports
Extent reports can be integrated with Selenium webdriver using TestNG/Junit
test frameworks
Extent reports can add events, screenshots, tags, devices, and any other related
information about test environment
18) Sean is coding an automation script for emulating user actions by mouse
using the webdriver library. Assist sean to choose the correct syntax to create
an object for actions class from the following
Ans: Actions act=new Actions(driver instance)
19) Which Java interface is used to capture screenshot of a webpage using
webdriver API?
Ans: TakeScreenshot
20) Sean wants to switch to multiple frames on a webpage when an operation
is completed on a frame an test flow needs to move to another frame, calling
the driver.SwitchTo().frame() immediately will not move the context to the
next frame which is at the same level in DCM. The test will first need to switch
to the main document and then activate the desired frame which method is
used to switch back to the main document from the frame?
Ans: driver.SwithTo().defaultContent()
21) Samatha wants to write an automation script that determines the count of
hobbies check boxes. These check boxes have a name attribute as ”hobbies”.
Assist Samatha by choosing the correct command
Ans: Driver.dindElements.By.name(“hobbies”).size()
22) Samatha is automating a test scenario. This scenario involves a pop up of a
confirmation window. She wants to interact with the pop up window and
decline the confirmation pop-up window that shows a message “Do you want
to cancel the payment?”. Choose correct code
Ans: Driver.SwithchTo().alert().dismiss()
23) Sarah is coding an automation script to switch to frame in a web
application. Help her to switch a particular frame on a web page using the
window library. She wants to interact with the pop up window and decline the
confirmation pop up window show a message “Do you want to cancel the
payment?”. Assist Samantha to interact with
Ans: Driver.SwitchTo().frame(int index)
Driver.SwitchTo().frame(String name or id)
24) Which of the following is correct about generating an XML Suite file is
TestNG for Test Suite execution?
Ans: Test NG XML suite file
Can be generated at the time of creating TestNG class
TestNG XML suite file can be generated using convert to TestNG option in Eclipse
after a java code
25) Sarah is designing an automation script using descriptive programming in
UFT for a web based Flight GUI application. Assist sarah with a tool to identify
the property of the test scripts
Ans: Object Spy
26) Sarah wants to slice a text to perform a test on a message. She used the
split function in VB Scripting to chop the strings. Predict the output for the
below code
Arr=Split(“this ”is ”VB”Scripting”,” ‘ ”)
Msgbox arr(2)
Ans: VB
27) In UFT which type of variable can be accessed by all actions, function
libraries and tests that have a global scope?
Ans: Environment variable
28) Which of the following types of applications can be tested using UFT?
Ans: Web app, SOAP and REST APIs
29) A retail application generates an order id on successful order placing. Order
id follows the pattern. Starts with TXN, followed by 3 digit number and ends
with any capital alphabet
Ans: ^TXNd[3]{A-Z}$
30) Jack wants to apply checkpoint in an existing test script. He decides to use
keyword view to insert checkpoint. Which all checkpoints can be inserted using
keyword view?
Ans: Only standard
31) What type of action can we create if others want to reuse that action, but
at the same time, it should be non-editable for others?
Ans: Reusable action
32) Chetan wants to add some additional information like the environment for
test execution, which method can be used to add the information in the test
method?
Ans: Add Run Information
33) Predict the output for the below code snippet Msgbox (“UFT” &
String(3,”T”))
Ans: 6
34) Many wants to add the HTML report snippet to have better clarity in the
test results. Which Reporter object method can be added to achieve the task?
Ans: ReportHTMLEvent
35) There are various elements in a SOAP message. Which element of the SOAP
message shows error message and status information?
Ans: Fault
36) Lisa is a new joiner to cucumber project assigned to execute the scenarios
marked as both OAT and UAT tags. Which of the following will assist Lisa to
execute the desired Scenario using tags from Cucumber option?
Ans: @CucumberOptions(tags=(“@OAT”,”@UAT”))
37) Henry wants to write some comments in the feature file. Which character
command is used to define comments in the feature file?
Ans: #
38) Kevin is creating a feature file with multiple scenarios. He wants to apply
multiple tags to a scenario. Which of the following best requirements the
technique to apply multiple tag names?
Ans: @Tag1,@Tag2
39) Which statements are true about feature file?
Ans: only 1, 2 & 3 : A feature file contains multiple scenarios
Feature Gherkin keyword is always written as first high level keyword in a feature
file
There can be multiple feature file in a project
40) No question
@when(“Kevin enters quantity as{int}item(3)”)
@Then(“Shopping cart icon shows {int}”)
41) Which of the following is not a valid element in the JMeter test plan?
Ans: Annotation
42) Which of the following is past processor in JMeter ?
Ans: Regular expression Evaluator
43) Which of the following parameters can be configured using a thread group?
Ans: Ramp-up period
Loop count
44) Which among the following is an invalid controller in JMeter?
Ans: State controller
45) Which of the following fields in the defect log helps the tester to prioritize
and fix the defect?
Ans: Severity
46) Sean is coding an automation script to test a web application. He has to
store the largest link in a java variable using a driver find element() method.
Suggest Sean with a compatible return type to store the logout test object?
Ans: WebElement
47) James want to automate the selection of ID proofs drop down box in the
web application . He has to verify the drop down box has a selection of more
than one option. Which of the following method is suggested to JMeter?
Ans: Ismultiple()
48) When verification fails in TestNG. What forces the test to stop execution
and mark as fail?
Ans: Assertion Fail
49) Kavin wants to generate extensive report for the test automation project.
He decides to use Extent reports library. Which class in this library is used to
create labels, code blocks and labels in the report?
Ans: Markup Helper
50) Sean configured this project for the test Suite execution using TestNG. He
wants to perform parallel execution using TestNG. Which attribute represents
the parallel execution of the test cases?
Ans: Parallel=”tests”
51. Kevin is using CSS selector as a locator strategy for the following element <h1
id =”msg1” name=”success”>Registration completed</h1>. He must identify the
element efficiently.
Ans: .By CSS Selector(“h1[id=’msg01’]”)
.By CSS Selector(“h1[id=’msg01’][name=’success’]”)
52. There is an element on the webpages when inspected on the browser it looks
like <div call=”errorMsg”>Error Message</div>. James wants to use selenium
locations to identify the element. Choose the correct set of commands to locate
the elements efficiently.
Ans: By CSS Selector(“div.errorMsg”)
53. Sarah wants to automate the selection of only one option from a dropdown
box as shown below
<html>
<body>
<select multiple>
<option value=”web”>html</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
<option value=”prog”>python</option>
<option value=”prog”>java</option>
</select>
</body>
</html>.
Sarah has to select only the fourth option,i.e,python from the options field.
Ans: Select By Index()
54. Identify the valid statement from the below given options.
Ans: Browser(name i=Demowebshop).page(page i=”.*”).WebEdit(“Emailiq”) Set
Prince
55. Neha is an automation tester working for TestMe project. She wants to log
some information in the UFT tet result pane. Which reporter object method is
more relevant in the situation?
Ans: MicDone
56. UFT supports various debugging techniques that help us in finding the issues
in the automation script. Which technique allows us to change the value of local
variables at runtime to understand the behaviour?
Ans: Console
57. Which of the following statements regarding actions in UFT is incorrect?
Ans: In actions, parameters are passed by value and by
58. To execute a cucumber scenario, which file(s) are important and must be
created in the maven project?
Ans: .feature file, .step definition
59. Henry wants to generate JSON reports on the execution of Test Runner in
cucumber. Assert Henry with the right option to configure the JSON report
generation in @Cucumber options?
Ans: @Cucumber Options({plugin=pretty,”html:report.html”})
60. Henry has created a feature file with tagged scenarios. He wants to execute all
the scenarios excluding “SevereTag” scenarios. What command should he use in
cucumber options for TestRunner class?
Ans: tags=(“~@SevereTag”)
61. Which of the following will control the amount of time Jmeter will execute a
test plan?
Ans: Test duration
62. Which of the following types of applications can be tested using Jmeter?
Ans: All of these
63. Jude is testing the login page of an application that contains 10 fields. He has
analyzed the data dictionary to derive the test data for the login page. He has
tested the application with all the combinations as it was a mandatory task
required for the project. However, he is sure that 0% of defects do not guarantee
the process success from the customers perspective, please predict the testing
principle that he is referring to in the above statement?
Ans: Exhausting testing not possible
64. Which of the following styles of writing test scenario ids will represent clearly
the referenced test scenario and help the testing team for tracking purposes?
Ans:
65. Sean is coding to automate a test scenario in which he has to click on a
dynamic link to navigate to the shopping cart page.
The web element looks like <a href=”icart.jsp? params”>cart[19]</a>. Which
locator is most recommended for the scan to identify the cart web element for all
test iterations ?
Ans: By.partial link Text()
66. Kevin wants to fetch all the data from the country dropdown menu and verify
the data against data from the database. He is looking into the library for a
method to fetch all the data from the country dropdown box .Which method
helps Kevin?
Ans: get options()
67. What does double forward slash // represent in xpath selenium locations?
Ans: relative xpath
68. Kevin is planning to write automation script for below scenario.
Given the user is on the payment page. He views a textbox with attribute values .
“Enter Mobile Number” written in the box. The user must enter the mobile
number in the box to proceed. Please choose the correct command to help Kevin
in automating the scenario. Assume the textbox element is already identified and
stored in mobile txt box variable .
Ans: mobileTxtBox.sendKeys(“xxxxxxxxxx”)
69. Henry is designing a script and using CSS selector as the locator strategy. He
must locate the element efficiently. The element inspected looks like <input
id=”new password” type=”password”>.
Ans: By CSS Selector(“input[id=password]”)
70. Kevin is designing an automation test, where test data is specified in an
external excel file. Which command will be helpful to write the data into a cell of
the excel file? Assume c1 is the cell object.
Ans: c1.SetCellValue(‘data’)
71. <html>
<body>
<ul class = ”cities” >
<li>Bangalore</li>
<li>Chennai</li>
<li>Mumbai</li>
<li>Bangalore</li>
<li>Pune</li>
</ul>
</body>
</html>
Sarah wants to locate the 3rd child element i.e. Hyderabad.Suggest the
appropriate locator strategy by Sarah.
ANS- CSS=”ul.cities.li inth of type(“Hyderabad”)”
72. UFT supports various synchronization techniques that helps us to manage
web applications. Which technique is applied only to webpages and browsers ?
ANS- Sync.
73. Consider a test String to be “order 200 completed”. which of the below
regular expression(s) will not match the given string?
ANS- order [0-9]+Completed
74. Henry had bined a project team. The team is using the BDD framework for
effective testing . Henry must understand keywords in Cucumber. Which gherkin
keyword indicates the pre-conditions / pre- requests steps in a feature file?
ANS- Given
75. Samantha has created a feature file in a project. she wants to configure the
Test Runner class using feature files/glue tags. Which of the following is the
correct set annotations to be used in the test runner?
ANS- @Runwith ; @Cucumber options.
76. Write in corect order
a. Triggers the build
b. Open reports to see the latest test results
c. Jenkins checks the Git Repository periodically to detect changes in build
project.
d. The build is successful / Failure.
e. Testers/ Developers commits source code changes to the shared Git
Repository
ANS-
77. Which of the following elements of Jmeter executes after the sampler
requests are executed in the test plan?
ANS- Post Processors.
78. Sarah is coding in a test scenario, in which she must fetch the booking id as a
text message from the span element
The web element looks like <Space> order completed with Booking
id:6665<Space>
Help Sarah to find a method from the webdriver library to fetch the booking ID?
Ans- get Text();
79. James is automating a script and using CSS Selector as a locator. What are the
primitive types for designing the CSS selector?
ANS- .id, . Attribute, .innerText()
80. Which expression is used in CSS Selectors to match the attribute value with a
prefix?
ANS- ^=
81. Sean is coding an automation Script to launch the web application on a
browser window. Which of the following listed option(s) will help Sean to launch
the designed application on a web browser in Selenium?
ANS- .driver.get(“URL”) , .driver.navigate().to(“URL”)
82. Which date format is used to customize the system date to Year-Month-day
format?
For example 2019-04-24
ANS- new Simple Date Format(“YYYY-MM-dd”).
83. Select the correct order of execution of annotations, as per the life cycle of
Test NG which can be applied for test methods along with before XXXX-after
XXXX methods
ANS- Before test, Before class, Before method , test , After method, After class ,
After test .
84. Sam has created a Test NG project with below specified Test class
Public class Test class
{
@Test (Priority = 1)
Public void method 1() (-----)
@Test
Public void method 3() (-----)
@Test
Public void method 2() (-----)
@Test
Public void method 4() (-----) }
ANS- Method 2 - Method - 3 Method - 1 Method – 4
85. What are the various status options available in the Extent Reports library?
ANS- PASS , FAIL , SKIP , FATAL , ERROR , Warning , INFO
86. Sarah wants to perform a few scenarios using a do-while loop in UFT. She has
written the below code. Predict the number of times the loop will be executed ?
i=10
Do while (i<5)
msg box i
i=i+1
loop
ANS- Does not execution in the condition
87. Predict the Output for the below code snippet
Dim Str
Str = Str Reverse (mid (“Unified functional testing”,4,9))
Print Str
ANS- couf deif
88. Predict the Output for the below code snippet
Dim a,b
a= ”vbscript”
b= Left (Right (a,3) 2)
print
ANS- ip
89. Which of the following reports can be generated using plugins from
Cucumber options?
ANS- All of the above
90. James wants to design a scenario in a feature file, in which the complete
scenario runs multiple times for different data sets . Suggest James with a Gherkin
keyword to activate drop-down testing in the feature file ?
ANS- Use Scenario outline.
91. Jack had created the feature file with the below mentioned scenarios as
shown below:
@smoke
Scenario: This is the first scenario
@crash
Scenario: This is the second scenario
In test runner class, Jack mentioned @cucumberoptions (tags=(“smoke”)) predict
which scenario is/are gets executed
Ans: Execute first scenario
92.Which of the following is the logical container that contains all the elements
which drive the performance test?
Ans: Load Testing
93. Which of the following assertions is not applied in Jmeter?
Ans: web
94. Which of the following is an invalid configuration element in Jmeter?
Ans: FTP cookie manager
95. Which of the following input documents is used to create test scenarios and
conditions?
Ans: Use cases
96. Which of the following Java classes are from the extent API library?
Ans: ExtentReports, Status
97. Sean is coding to automate a web application using the webDriver library. He
had set the implicit wait of 30 seconds. However, the webelement was found
within 10s . Will the webdriver wait for further 20 seconds before executing the
next line of code?
Ans: Yes, webDriver will wait 20 more seconds.
98. Which method is used in the Apache POI library to fetch the cell value from a
row? Identify the correct format of invoking the library functions to get the value
from the cell
Ans: sheet.getRow(rowno).getcell(col no).getStringCellValue()
99. Sarah is coding to automate script to switch to multiple windows in a web
application. She has to store all the window instances in a java variable which is
retrived by driver.getWindowHandles(). Suggest sarah with a compatable return
type to store the window references.
Ans: list <string>
100. Mary is struggling to find a suitable simple wild cart character that matches
any single character . Please suggest to her which of the following characters
many be relevant to her search
Ans: .(wildcard character)
101. Which Gherken keyword is used to create/execute as a common given step
for all the scenarios in the feature table?
Ans; Background
102. sarah has her code in git local repository, but her team lead had pushed the
new changes into the remote repository, Which git command would you
recommend Sarah with new changes into her working copy?
Ans: put
103.
104. Which parameter types in cucumber expressions matches text without white
space?
Ans:{ word}
105. Sean is automating a test scenario in which he has to fetch the URL of the
webpage using webDriver API. Suggest a method fo Sean to get the link address
Ans: getCurrentURL()
106. Ans: No such element Exception
107. Sean is performing verification using assert class functions from TestNG.
Suggest him the correct method to verify the reference/address of the two
objects to be identical?
Ans: assertSame(object1,object2)
108. Sam is designing an automation test where test data is specified in an
external excel file. Which command will be helpful to get access to the 2nd sheet
of the excel file. Assume web is the writebook object
Ans: who.getSheetA1(1)
110. Which of the following is a listener in JMeter?
Ans: All the above (Assertion results, Monitor results, Aggregate report)
111. Sarah is coding to automate a scenario for the selection of the “from Cities”
drop down box on the flight booking application web page, which class is used?
Ans: Select Class
112. Which of the following elements of JMeter helps to validate whether on
application is returning on excepted response or not?
Ans: Assertion
113. Which controller in JMeter you organize the samples & other logic
controllers?
Ans: Simple
114.
Ans: Once Only
115.
Ans: WebElement element 01 = driver.findelement(By.id(“Searchbox”));
116.
Ans: Test Driven Development
117. Trigger all scenarios
Ans: Feature file
118. BDD Process
Ans: 2-3-1-4-5
119. Selenium Grid (Multiple Box)
120. standard
Standard, Text and Bitmap (Active Screen)

You might also like