Selenium Cucumber Java BDD Framework 5 - Parameterization & Data Driven Testing

preview_player
Показать описание
Today we will learn:
1 - What is parameterization
2 - What is data-driven testing
3 - How to run a feature multiple times with different sets of data

Prerequisites (Completed in earlier session)
1 - Project is setup with required maven dependencies (libraries) added
2 - A sample login test

Step 1 - In the feature file select the values that need to be parameterized
Step 2 - Put the values within conical brackets or double quotes (Parameterization)
Step 3 - Change Scenario to Scenario Outline
Step 4 - Add Examples section
Step 5 - Add data for the parameters in the Examples section
Step 6 - Update step definition to get values from feature file Examples section
Step 7 - Run and verify

Hi, I am Raghav and today we will learn -

Hit Like and. Subscribe button, if you like this video. It gives me great motivation.

You can support my mission for education by sharing this knowledge and helping as many people as you can

Рекомендации по теме
Комментарии
Автор

watching all Cucumber java videos one by one..really helpful...Thanks

starSha
Автор

I was having problem with learning cucumber from other sources. But the way you explain i didnt have any problem understanding. It feels like i found my source of learning all things from you. Thank you very much for working so hard to teach others.

HeReTicGaMe
Автор

Thank you Raghav. your sessions are soo good. This session will sure helps the fresher or manual tester to kick start their automation skill

preethig
Автор

Hi Raghav, I have watched and recommend this playlist to all my friends and must say its really helpful and easy to understand through your videos. I have one question, can I parameterize rows with no fix column? Such as in 1st row there are 5 column and and in second only 4 and so on. Can I do it using Scenario Outline?

rajsonawane
Автор

Thank you very much Raghav, thoroughly explained.
could you please make videos for
1. data driven testing using properties file as an input
2. how to test sqls/unix commands in cucumber.
3. how to test soap/rest API's using cucumber.

it would be a great help:)

cnsupriya
Автор

Thank you Raghav, u made us very simple to learn...please make video on how to handle Multiple Feature files with different combinations in reality and how to handle Datatables with Maps

RajeshR-ypsy
Автор

Nice explanation, glad that I found your videos on many topics - very clear and you make them so simple to remember. great effort and keep going and help all the curious learners.
Have one question, as here passed 2 sets of data, but if we have multiple sets of data(may be 100 sets) then how to parameterize. Should we use a third party file like .xls or .xslx. If so then how to read the data from the file.

nagay
Автор

Thanks, Raghav for very well explained the Parameterization and Data-Driven Testing. Can we use data files i.e CSV, Excel, and database(Oracle.etc) instead of mentioned data details in the feature files? If yes could you please add that video in near future?

mayankjain
Автор

Thank you Raghav sir, you have explained it and clearing out all of our clarifications 👍

sowmiacharkonda
Автор

Thank you, sir, you made it very simple and easy. I am very grateful.

aliwakillodi
Автор

super Raghav👌nice lecture to data driven testing in cucumber

ganeshkottapalli
Автор

Informative and nice explanation. Thank you !

sireeshabhagi
Автор

Thanks Raghav. Its Really helpful. Could you please make a video on how to register a website using Datatable in BDD Cucumber.

suvendupathak
Автор

only word i can say after watching the video is amazing and thank you for making such videos.

suchishah
Автор

Hi Raghav, This video was very helpful for me.Thank you very much.👍👍

ick
Автор

Thank you Raghav ! very helpful and clear explanation.

aadel
Автор

Hi Raghav,

As always, thanks for the tutorial. I've followed this tutorial and saw some exceptions as I switched to use gecko/FireFox (geckodriver-v0.27.0-win64 and Firefox 81.0 64 bit).
For any scenario, at the final step I see the exception:
" Browsing context has been discarded"


Here is the exception from Eclipse terminal:

Scenario Outline: Check login is successfull with valid crredentials #
Inside Step: browser is open
projectPath =
on 127.0.0.1:11548
command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "-foreground" "-no-remote" "-profile"
Can't find symbol
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
console.error: SearchCache: "_readCacheFile: Error reading cache file:" (new Error("", "(unknown module)"))
on port 49198
certificate errors will be ignored for this session
Sep 26, 2020 8:00:32 PM createSession
INFO: Detected dialect: W3C
Given browser is open #
Inside Step: user is on login page
And user is on login page #
When user enters Esther and 12345 # StepDefinitions.LoginDemoSteps.user_enters_username_and_password(java.lang.String, java.lang.String)
And user clicks on login #
Browsing context has been discarded
Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'
System info: host: 'ONGS-41', ip: '192.168.1.97', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '14.0.2'
Driver info:
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 81.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20200917005511, moz:geckodriverVersion: 0.27.0, moz:headless: false, moz:processID: 31584, moz:profile: C:\Users\steve\AppData\Loca..., moz:shutdownTimeout: 60000, false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, platformVersion: 10.0, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID:
*** Element info: {Using=id, value=login}
at Method)
at
at
at
at
at
at
at
at
at
at
at
at
at
at
at

Then user is navigate to the home page #

Failed scenarios:

2 Scenarios (1 failed, 1 passed)
10 Steps (1 failed, 1 skipped, 8 passed)
0m33.959s

.... Any help would be appreciated.

ongs
Автор

Thank u Raghav...This is an amazing video for beginners

pallavigowda
Автор

At 8:31, line 41, you said put (.*) for a string. What is the difference between {string} and (.*)? My eclipse didn't run on (.*) (MAC computer)

seymavural
Автор

Thank you so much sir, it's very easy to understand the way you explain.
Words fall short to thank you for this service.
I jus wanted to ask you can we implement in the same way in real time too?

supriyassampath