Cucumber & Jmeter: 1) What Is BDD?
Cucumber & Jmeter: 1) What Is BDD?
Cucumber & Jmeter: 1) What Is BDD?
1) What is BDD?
ANS:-BDD is the software development & testing process , & cucumber was developed to support
BDD.
2) Practices/Phases of BDD?
ANS:- Page Factory is a class provided by Selenium WebDriver to support Page Object Design
patterns. In Page Factory, testers use @FindBy annotation. The initElements method is used to
initialize web elements. @FindBy: An annotation used in Page Factory to locate and declare web
elements using different locators
4) Use of @findby?
ANS:-The @FindBy annotation is used in Page Objects in Selenium tests to specify the object location
strategy for a WebElement or a list of WebElements. Using the PageFactory, these WebElements are
usually initialized when a Page Object is created
5) Scenario Outline ?
ANS:- It is also defined as "Scenario outlines are used when the same test is performed multiple times
with a different combination of values." ... Scenario outline is exactly similar to the scenario
structure, but the only difference is the provision of multiple inputs
6) Background in Cucumber?
ANS:-is used to define a step or series of steps that are common to all the tests in the feature file. It
allows you to add some context to the scenarios for a feature where it is defined. A Background is
much like a scenario containing a number of steps.
FTP Request.
JDBC Request.
JMS request.
LDAP Request.
1
Mail request.
8) Runner Class -
Ans:-This class will use the Junit annotation @RunWith(), which tells JUnit what is the test runner
class. It more like a starting point for Junit to start executing your tests. In the src folder create a
class called TestRunner.
9) What is correlation?
ANS:- Correlation is basically extracting value from one of the requests which can be used in the
subsequent request or any of the request which must be executed further. For extracting values out
from a request, you need processors. Pre-Processors like HTML LinkParser can extract all links from a
page received in response.
ANS:-The json plugin can be used to execute action methods from javascript and return the output.
ANS:-Data tables are used when we need to test numerous input parameters of a web application.
For example, the registration form of the new user involves several parameters to test, so for this, we
can use the data table. ... The registration form contains the following parameters: User Name.
ANS:- Three Amigos are the key stakeholder who participate in example mapping to start working on
problem domain and confirming acceptance
Three amigos meeting the input is user story and business rules
1) Product Owner: - for identify the scope of the application and converting user stories into features
2) Tester:- for generating test scenarios where the application can break
3) Developer:- to go in details into each requirement how the application will excute and what could
be the hindrances
ANS:-A feature file is usually a common file which stores feature, scenarios, and feature description
to be tested
ANS:-When Cucumber executes a Gherkin step in a scenario, it will look for a matching step definition
to execute.
2
15) explain gherkin keywords
ANS:-In Cucumber, tags are used to associate a test like smoke, regression etc. with a particular
scenario.
18) What if error occurred like no such element found and remedy?
ANS;-The NoSuchElementException is thrown when the element you are attempting to find is not in
the DOM
ANS:-TDD is a Software Development methodology in which first test cases are written in the form of
stories and then allowed to fail. After that the developers write code to pass the test cases thus
implementing the story or requirement.
20) Gave one scenario and asked how will you write feature file for it ?
ANS:-In Selenium, test scripts can be written in Java, C#, etc., while in Cucumber, test scripts are
written in plain text language according to Gherkin language rules. In Selenium, conditional
statements can be used, while in Cucumber, we cannot use conditional statements.
3
22) what is smoke and sanity ?
ANS:-Smoke Testing is a type of testing which is done to assure that the acute functionalities of
program is working fine. ... Sanity testing is done to check the bugs have been fixed after the build.
Smoke testing is also called subset of acceptance testing. Sanity testing is also called subset of
regression testing
ANS:-it is a free web automation server .it is used to do many sw developments like testing,deploying
etc.
ANS:-Generally, a JAR file contains Java related resources like libraries, classes etc. JAR file is like
winzip file except that Jar files are platform independent. A WAR file is simply a JAR file but contains
only Web related Java files like Servlets, JSP, HTML
ANS:-The JSON PostProcessor enables you to extract data from JSON responses using JSON-PATH
syntax. This post processor is very similar to Regular Expression Extractor. It must be placed as a child
of HTTP Sampler or any other sampler that has responses.
Json,html, Junit
4
29) Clone ?
ANS:-BDD is Behavior Driven Development. ... TDD is a development practice while BDD is a team
methodology. In TDD, the developers write the tests while in BDD the automated specifications are
created by users or testers (with developers wiring them to the code under test.)
34)List Listners ?
Graph Results.
Spline Visualizer.
Assertion Results.
Monitor Results.
Aggregate Graph.
Mailer Visualizer.
ANS:-The Build Review Action can be invoked manually from within Jenkins. From the Jenkins
dashboard, click the job name in the table. Click Build Review in the sidebar menu. Complete the
form to specify the parameters for build. To trigger the build, click the Build button .Automatically
5
Q How do I trigger a build automatically in Jenkins?
ANS:-In Jenkins, go to the project configuration of the project for which you want to run an
automated build. In the 'Build Triggers' section, select 'Build when a change is pushed to GitHub'.
Save your project. Jenkins will now run the build when you push your code to the GitHub repository.
ANS:-A maven is a build tool designed to manage dependencies and the software lifecycle. It is also
designed to work with plugins that allow users to add other tasks to the standard compile, test,
package, install, deploy tasks. Jenkins is designed for the purpose of implementing Continuous
Integration (CI).
ANS:-Github is a web-based platform used for version control. Git simplifies the process of working
with other people and makes it easy to collaborate on projects. Team members can work on files and
easily merge their changes in with the master branch of the project.
6
Steps for cucumber
Install java eclipse maven
Create new maven project, configpom xml with neccesry dependencies, and plugins
Create feature file
-
Configure cucumber with maven
Add dependencies
[Java junit
Scenario explanation
Irail application
Working on a rail client
Presently in this irail application all the customer can buy the ticket in advance however the
seat will not be guaranteed
Requirement- to encourage people to get the reserved seat, irail wanted people to book
their seat during the time the buy the tickets in advance
Decided to use the agile methodology in the BDD approach for the sdlc
Seat allocation automatically
Highlight reserved seats in carriage
User story- Discovery -BDD helps teams to have the right conversations at the right time so
you minimise the amount of time spent in meetings and maximising the amount of valuable
code you produce.
Formulation
Automation
BR Application can’t allow booking more than 75% seats in carriage
7
.ANS given statement:- Background keyword is used to group multiple ts into a single group
Q. Cucumber Expressions –
ANS:- cucumber uses cucumber expressions to link gherkin step with a step definition
ANS:- word- matches the word without any whitespace. String – matches any single/double
quotedstrings
Q Listeners in Jmeter :
ANS - View results tree, View results in table, Summary report, Aggregate report, Aggregate graph,
Save responses to a file.
ANS :-JMeter GUI Mode, JMeter Non-GUI Mode, JMeter Server Non-GUI Mode
ANS:- The Runner class provides methods that interact with the runner. This class will use the Junit
annotation @RunWith(), which tells JUnit what is the test runner class.
Q Meaning of Monochrome :
ANS:- Monochrome is single color. When object needs to be totally unbiased of color.
RUNNER-The runner cls provides method that interact with the runner
8
Q. BDD vs TDD
• TDD means writing a test that fails because the specified functionality doesn't exist, then writing
the simplest code that can make the test pass, then refactoring to remove duplication.
BDD means creating an executable specification that fails because the feature doesn't exist, then
writing the simplest code that can make the spec pass
Q . Selenium vs cucumber
ANS• Selenium is an automation tool for web apps, while Cucumber is an automation tool for
behavior-driven development.
Q .tags –
ANS:- In Cucumber, tags are used to associate a test like smoke, regression etc. with a
particularscenario.
ANS:- • most of the work in maven is done using plugins. dependency is just a Jar file which will be
added to the classpath while executing the tasks.
. Pom—
ANS:- A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file
that containsinformation about the project and configuration details used by Maven to build the
project
Q data driven
ANS-- it means it makes strategic decisions based on data analysis and interpretation
.ANS:- Graph Results, Spline Visualizer, Assertion Results, Simple Data Writer, Monitor Results,
Distribution Graph (alpha),Aggregate Graph, Mailer Visualizer
.Q What are the differences between test plan and test lab?
ANS:- A test plan is a comprehensive document that lays out all major activities associated with a
particular testing project. a test case is only designed to test a particular scenario
TP Request
JDBC Request.
9
Java object request.
JMS request.
LDAP Request.
Mail request
• Cucumber Reports
ANS:- TDD is Test Driven Development. BDD is Behavior Driven Development. TDD means writing a
test that fails because the specified functionality doesn't exist, then writing the simplest code that
can make the test pass, then refactoring to remove duplication. BDD means creating an executable
specification that fails because the feature doesn't exist, then writing the simplest code that can
make the spec pass
Q. Practices of BDD—
ANS:- The process begins in the discovery phase, where the Product Owner or Product Manager
creates acceptance criteria as part of writing a story or feature. The discovery process is
collaborative, and team members also discover and contribute additional criteria.
Q what is Bdd-- .
ANS:- BDD is Behavior Driven Development. . BDD means creating an executable specification that
fails because the feature doesn't exist, then writing the simplest code that can make the spec pass
Q. Bdd advantages: --
10
Q explain discovery phase in bdd
ANS:- The process begins in the discovery phase, where the Product Owner or Product Manager
creates acceptance criteria as part of writing a story or feature. The discovery process is
collaborative, and team members also discover and contribute additional criteria
• Selenium is an automation tool for web apps, while Cucumber is an automation tool for behavior-
driven development. • Selenium executes UI tests while Cucumber does acceptance testing. •
Selenium script creation is complex while Cucumber is more simple
ANS:-JVM is published in the central Maven repository. You can install it by adding dependencies to
your project. Dependencies. Make sure the Cucumber version is the same for all Cucumber
dependencies.
Q.Monochrome in cucumber
ANS-- Monochrome: This option can either set as true or false (default value is false).
ANS :-JSON-Java script object notation is another format for generating Cucumber test reports.JSON
is an object containing a lot of information stored in text format. JSON reports bring a different value
to the table. JSON report can also be used as a payload of information to be transferredbetween
different servers
ANS—testrunner.java, eclipse console output, full code,html report output, xml report output
The process begins in the diType equation here.scovery phase, where the Product Owner or Product
Manager creates acceptance criteria as part of writing a story or feature. The discovery process is
collaborative, and team members also discover and contribute additional criteria
11
6. Runner Class – To execute scripts
12
37. Does order of the gerkins keywords matter(given,when,then..) yes
38. explain data table in cucumber
39. What are the steps to run in cucumber?
ANS:
Create feature file
Configure the runner class
Run the runner class
Step definitions will be created
40. Role of POM in cucumber?
41. Full form of vbScript? Visual basic
42. Gherkin keywords
43. Difference between executing feature file and while cucumber project
44. How to reduce step definitions steps in cucumber? Any idea
45. Tags in cucumber scenario, screnario outline, examples, feature
46. Bdd vs tdd
47. What is correlation?
48. List some of the Jmeter listeners
49. what is your fav topic from the training module-cucumber
50. Where is cucumber used - BDD
51. Y data table is used – To reuse the code
52. Scenario
53. Reports of cucumber
54. Difference btw word and string
55. Data types in cucumber
56. String s is small or big
57. Reports in cucumber
58. Page object model explanation
59. Web elements used in page obj modelfindby,findbys
60. Cucumber with Jenkins integration
61. 2. Diff word and string
62. (Only Cucumber related questions)
--------------------------------------------------------------------------------------------------------------------------
----------------------
63. What is bdd and tdd
64. Explicit wait
65. Descriptive programming in uft
66. Locators in selenium
67. Why we use it
68. Special character usedfor data table “<cucumber>”
69. BDD
13
70. Practices of BDD
71. Special character usedfor data table “<cucumber>”
72. BDD
73. Practices of BDD
74. Cucmber expression
75. what is Bdd
76. Bdd advantages
77. Can we proceed to the formulation without discovery, how does it affect?
78. what are concrete examples
79. explain discovery phase in bdd
80. How do Youknow you have come to an end of formulation of test conditions?
81. BDD and TDD practice sequence
82. Gherkin Step Sequence
TRAINER: KRITHIKA
88. Scenario explanation
89. Practices in cucumber
90. Reports in cucumber
91. Types of recording modes in uft
92. Diff bet analog and low-level recordings
93. locators in uft
--------------------------------------------------------------------------------------------------------------------------
----------------------
94. Selenium cucumber differences
95. dependencies in cucumber
96. plugins used in cucumber
97. Practices in cucumber
98. What you do in discovery phase?
99. He asked me to show how to add html report in runner class
100. How to use data driven testing (scenario outline)
101. 1. Explain scenario
102. 2. What are types of maven repositories
103. 3. Explain about plugins and dependencies
104. 4. Which plugins have you used?
14
105. 5. Explain the structure of pom
106. 6. What is the style in which pom is written
107. 7. Explain BDD and TDD
108. 8. What's the difference between BDD and TDD
109. 9. What is Data Driven Testing
110. 10. How do you open a jmeter file
111. 11. Syntax of opening jmeter in non GUI mode
112. 12. Extension of jmeter file and extension of log file
113. 13. What are the types of listeners in jmeter
3. Give library lending books as a requirement & to explain the feature file
1. Explain scenario
3. What is TDD?
-They have asked to give the path of feature file so we use features= and specify the path.
-glue is to specify the step definition location.Here they have the step definition in the package name
cucumber,so they have written glue=cucumber.
-Dry run is to check whether all the steps in feature file has a equivalent method in step definition.
15
What is page object ?
16