Hello friends if you are looking for Cucumber MCQ with answers | Cucumber Multiple choice questions | Cucumber Objective type questions | Cucumber Dumps Practise test | Cucumber MCQ with options and answers then here you will get all answers.
Q1. Which Gherkin keyword is used to create /execute as a common given step for all the scenarios in
the feature file?
A. Before
B. Background
C. After
D. Scenario outline
Ans - B
Q2. Choose the correct order of the BDD process for test automation.
Ans 1. Copy the generated empty test step methods to Step Definitions.
2. Create a user story with scenarios in the feature file.
3. Run the feature file to generate empty test step methods.
4. Develop the test step methods to concrete actions
5. Run the feature file to observe the test results.
A. 1-3-2-4-5
B. 1-3-2-5-4
C. 2-3-1-4-5
D. 2-1-3-4-5
Ans - C
Q3. Sarah wants to create a maven project in Jenkins to trigger the execution of cucumber
feature files for achieving the continuous Testing process. The source code of the project is
present in the GIT repository. Assist her to configure with the required details for building the
job successfully in Jenkins.
Choose the appropriate options.
A) Root POM location in git repository under
B) Additionally clone the project in eclipse from git repository
C) Selecting git with repository information in source code
D) Provide git hub project url in general details
E) Manually download the project from git repository
ANS - ACD
Q4. Which of the following elements of the Jmeter helps to validate whether in application in
returning an expected response or not ?
A) CSV data set config
B) Samplers
C) Logic controllers
D) Assertion
Ans - d
Q5. Which assertion is used for pattern strings to be compared against various fields of the
server response?
A) Duration
B) Size
C) XML
D) Response
ans -d
Q6.Which among the following is an invalid controller in Jmeter?
Ans 1 simple controller
2. static controller
3. random controller
4 loop controller.
Ans - 2
Q7. Which of the following is the logic container that contains all the test elements which drive
the performance test?
A) Load testing
B) Test plan
C) Test container
D) Test performance
Ans - b
Q8. 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 achieve data-
driven testing in the feature file.
A) Copy paste same scenario for each data
B) Use background with scenario
C) Use scenario outline
Ans - c
Q9. James has created a project with the following files, feature files,
TestRunner/CucumberRunner class and step definition class. Which file must be executed by
James in order to trigger the execution of all scenarios from the project?
A) Feature files
B) TestRunner/CucumberRunner class
C) Step defination class
D) None of the above
Ans - b
Q 10. To execute a cucumber scenario, which file(s) are important and must be created in the
maven project?
A) Feature file
B) Step defination
C) Selenium code
D) Page classes
Ans - ab
Q11. Which of the following is a Listener in the Jmeter?
1 .Assertion result
2. Monitor result
3. Aggregate report
4. All of the above.
Ans - 4
Q.12 Saraha has created Feature file in a ……….She wants to configure the TestRunner class
using feature Design steps. Which of the following is the correct set of assertions to be used in
TestRunner?
1. @Run with
2. @options
3. @cucumberOptions
4. @Runner.
Ans - 1 3
Q13. which of the following statements are true about the feature file?
1) A feature file may contain multiple scenarios
2) Feature gherkin keyword is always written as first/high-level keyword in a feature file
3) There can be multiple feature files in project
4) Feature files are saved with .TXT extension
A) Only 1 and 2
B) Only 1,2 and 3
C) Only 1 and 4
D) All 1,2,3 and 4
Ans - b
Q14. Controller in Jmeter lets you organize the samplers and other logic controllers?
Ans - logic
Q15. Sam is a software tester who wants to generate an HTML report post the execution of
cucumber features. Help sam to generate the pretty HTML report using the Cucumber Runner
class.
A) @CucumberOptions(plugin=("pretty","html report.html"))
B) CucumberOptions(plugin=("html")
C) CucumberOptions(plugin=("pretty","report.html")
D) CucumberOptions(plugin=("pretty","report report.html")
Ans - a
Q16. James has written a scenario in the feature file as below:
Scenario : the one where the user orders item with a single quantity
given caving is on add to Shopping Cart page
When Kevin enters quantity as 1 item
Then Shopping Cart icon shows 1.
Scenario: The one where the user order item with multiple quantities
Given one Kevin is on add to Shopping Cart page
When Cavin enters quantity as 2 items
Then Shopping Cart icon shows 2
Sam reviews the feature file and step definition both scenario must match with the same
@when and @Then methods.
choose the correct option for matching the step definition method for when and then
steps.
ans - B) @when("Kevin enters quantity as (int) item(s) ")
@then("shopping cart icon shows (int)")
Q17 Which of the following is an invalid configuration element in JMeter?
A) CSV Data set config
B) HTTP Cookie Manager
C) HTTP Header Manager
D) FTP Cookie Manager
ans - d
Q18. Which of the following represents a process where samplers are executed with the
multiple sets of input data?
A) Logic controller
B) Pre-processors
C) Parameterization
D) Co
ans - c
Q19. Which of the following is used to specify the number of times a thread will execute the
requests/samplers in the JMeter test plan?
A) Number of threads
B) Ramp-up speed
C) Loop-count
D) Test duration
ans - c
Q20. Kevin is creating a feature file with multiple scenario. He wants to apply multiple tags to a
scenario. Which of the following best represents the techniques to apply multiple tag names?
Choose the most appropriate options.
A. @Tag1,@Tag2
Scenario: This is login Scenario
B. @Tag1@Tag2
Scenario: This is login Scenario
C. @Tag1|@Tag2
Scenario: This is login Scenario
D. @Tag1&@Tag2
Scenario: This is login Scenario
ans -b
Q21. Which of the following will control the amount of time Jmeter will execute a test plan?
A) Number of threads
B) Ramp-up period
C) Loop-count
D) Test duration
ans - d
Q22. Which of the following are BDD practices?
A) Exploratory testing
B) Early testing
C) Specification by Example
D) Domain based testing
ans - b
Q24. Which of the below uses concrete examples to illustrate acceptance criteria and behavior
of the software to be made?
A) Specification by Example
B) Structure by Example
C) State by Example
ans -c
Q25. Which is used to read lines from a file, and split them into variables?
A) CSV data set config
B) HTTP cookie manager
C) Controller
D) Sampler
ans - a
Q26. What is displayed in the left pane of user interface?
A) Displays the elements used in development
B) Displays the elements used in testing
C) Displays the details of each element
D) Displays transaction details
ans - b
Q27. Which of the following statements is true about Pre-processors?
I. Pre-processors execute before the sampler requests are executed in the test plan
II. Pre-processors can be used for different performing testing needs such as capturing the response data
or stop the test/thread if the user requests failed.
A) Only I
B) Both I and II
C) Only II
D) None of these
ans - a
Q28. Which of the following represents a process where samplers are executed with multiple
sets of user input data?
A) Logic controller
B) Pre-processors
C) Parameterization
D) Correlation
ans - c
Q29. Which parameter types in Cucumber Expressions matches text without white space?
Example: banana (but not banana smoothie)
A) {String}
B) {text}
C) {word}
D) {chars}
ans -c
Q30. Which of the following assertions is not applied in jmeter?
Ans. Web
Q31. Arrange the build trigger process in correct order to achieve continuous testing using
Jenkins.
A) Triggers the build
B) Open reports to see the latest test results
C) Jenkins checks the git repository periodically to detect changes to build project
D) The build is success/failure
E) Tester/developers commits source code changes to the shared git repository
Ans) - ecabd.
e) Testers/Developer commits
c) Jenkins checks the Git repository periodically
a) Trigger the build
b) Open reports to see
d) The build is success/Failure (e,c,a,b,d)
Q32. Which of the following is a post process in JMeter?
Ans. Regular Expression Extractor
Q33. Which assertion is used for pattern strings to be compared against various fields of the
server response?
Ans response assertion
Q34. ……………… wants to fetch all the data from the country drop-down menu and verify the
data against ………………….. the data base. He is looking into the library for a method to fetch all
the data from the…………………… drop down box. Which method will help Kevin?
Ans. GetOptions()
Q35. 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
TestRunner class, Jack mentioned @CucumberOptions(tag=("smoke")) . Predict which scenario
is/are gets executed?
A) Executes first scenario
B) Executes second scenario
C) Executes both scenario
D) No scenarios are executed
ans - d
Q36. Which among the following is determined by the Logic controller?
A) The types of requests that are executed
B) The source of requests that are executed
C) The order in which user request are executed
D) All of the above
ans - c
Q37. Henry has joined a project team. The team is using the BDD framework for effective
testing. Henry must understand keywords in Cucumber. Which gherkin keyword indicates the
verification/validation steps in a feature file?
Ans. Then
Q38. Emily is executing a JMeter performance test plan using Jenkins. What is the default
format of Source Data Files that is used to publish performance test result reports?
ans - JTL
Q39. Which assertion is used to test whether the API server response was received within a
given amount of time or not?
Ans. Duration
Q40. Which controller in JMeter lets you organize the samplers and others logic controllers?
Ans. Logic
Q41. Which of the following performance testing types is used to check the stability of the
software when hardware resources like CPU memory or disk space are not sufficient?
Ans : Stress testing.
Q42. Sean had executed few scenarios through Cucumber Runner class from Eclipse IDE>When
he observed the console output, there were some characters which are not in readable format.
Assist Sean to apply a cucumber option which can format the console output in a readable
format.
Choose the most appropriate option.
A. dryRun=true
B. format=true
C. monochrome=true
D. strict=true
ans - c
Q43. Harry wants to create a Scenario Outline in the feature file. Which Gherkin keyword he
will use to provide the test data in feature file ?
Ans. Examples
Q44. BDD activity, in general, is a three-step, iterative process. What are these three practices
that are followed in BDD?
Choose the most appropriate option
A. Analysis, Requirements and design
B. Discovery, formulation and automation
C. Discovery, designing and development
D. Designing, discovery and development
ans - b
Q45. Which of the following is not a controller in Jmeter?
Ans. Condition Controller
Q46. Which of the following elements of JMeter executes after the sampler requests are
executed in the test plan?
A) Thread group
B) Samplers
C) Pre-processors
D) Post-processors
ans - d
Q47. Which of the following ……………. Represents the syntax of using JMeter variables in the
Test Plan?
Ans. $ { Variable Name }
Q48. Which of the following parameters can be configured using a thread group ?
1) Number Threads
2) Ramp-up-period
3) Loop count
4) Schedular: test duration, start-up delay
5) All of the above
ans - 5
Q49. A performance tester wants to record and capture the script for his designed scenario.
Please help him in selecting the element for recording in JMeter?
A) Loop Controller
B) HTTP(s) Test Script Recorder
C) Http Mirror Server
D) Listener
ans - d
Q50. Jean is new to the performance testing team. The team is using JMeter as a performance
testing tool. They are currently performing …………………. Using Response Assertion. Please
……………………………………………………………………………..
Ans. It can assert the test response , response headers
Supports rules like contains, equals, matches and substring
Allow use of AND , NOT OR operators
Custom failure message can be specified
Q51. Which of the following types of applications can be tested using JMeter?
Ans: Rest and SOAP,dashboard UDBC
Q52. Which technique in agile projects focuses on designing automated test scenarios prior to
writing the dev code, to achieve effective product outcomes?
Ans. Example Mapping
Q53. Which request is used by JMeter for creating scripts using recording proxy?
Ans. HTTP Request
Q54. Which of the following controller loads all the page objects in cucumber?
A) Page Factory
B) Object Repository
C) Object Maps
D) Object Dictionary
ans - a
Q55. Sarah has her code in git local repository, but her team lead pushed the new changes into
the remote repository. Which Git command would you recommend Sarah with new changes
into the working copy?
Ans.pull
Q56. How to capture word without whitespace value using cucumber expressions ?
Ans. {Word}
Q57.Which of the following is used to display the results in JMeter ?
Listeners
Q58. Thread Groups in JMeter denotes:
A) Number of Virtual users
B) Number of Physical/Live Users
C) Number of processes
D) None of the above
ans - a
Q59.Which of the following is used to display the results of the samples in JMeter ?
Listeners
Q60. Jack had created the feature file with the below-mentioned scenarios as shown
@Smoke
Scenario: This is the first scenario.
@Crash
Scenario: This is the second scenario.
TestRunner class, Jack mentioned @CucumberOptions(tags={“smoke”}).Predict which scenario is/are getting executed?
Ans - NO scenario excuted is
Q61. Harsh has created a scenario for his web application and recorded the script. He was to
debug the script and do enhancement in the recorded script before load testing. Please help
him with the appropriate …………
ans. View Result Tree
Q67. Which of the following performance testing types is used to determine the AUT’s behavior
with the expected load conditions for a longer period?
Ans. Endurance testing
Q68. Sophie is designing a Test Plan using Apache JMeter. She notices that a dynamic session id
is generated when a user logs into the application. This session id must be passes to the
subsequent requests so that the server can identify the logged-in user and provide relevant
responses. Which of the below concepts represents the above scenario?
A) Dynamic Expression
B) Parameterization
C) Correlation
D) None of the above
Ans-c
Q69. Henery has created a feature file with tagged scenarios. He wants to execute the
scenarios, excluding Severe Tags scenarios. What command should he use in cucumber options
for TestRunner class?
Ans. 1. Tags =’@SevereTag
2. Tags=’#@SevereTag
3. Tags=’@SevereTag’
4.tags=’not@SevereTag
ans - 4
Q70. Sarah would like to generate a dashboard from Jenkins for viewing the cucumber test
results. Which report format/plugin would you recommend Sarah to configure in the Cucumber
Test Runner class to get the dashboard view of test results?
. 1. Html
2. pretty
3. text
4. json
ans -1
Q 71. Sarah has her code in git local repository but her team lead had pushed changes into a
remote repository the . Which git command would you recommend Sarah with new changes into
a working copy?
A) Fetch
B) Get
C) Push
D) Pull
ans - d
Q 78 Emily is executing a JMeter performance test plan using Jenkins. What is the default format of
Source Data Files that is used to publish performance test result reports?
A) JTL
B) CSV
C) LOG
D) None of the above
ans - a
Q 82…………. controller in JMeter organize the samplers and other logic controllers?
ans - Logic
Q83 Samantha has created Feature files in a project. She wants to configure the TestRunner class using
feature file tags. Which of the following is the correct set of assertions to be used in TestRunner?
A. @RunWith
B. @options
C. @CucumberOptions
D. @Runner
ans - a c
Q 86 Sean is creating a build job in Jenkins to trigger……………………………suggested software
A) Add path to system/user environment variables
B) Add path to Global…………………………………….
C) Install plugins from Eclipse…………………..
D) Install plugins from managea plugins in Jenkins
ans - d.