selenium doubts

177 views
Skip to first unread message

software tester

unread,
Feb 16, 2018, 2:09:47 AM2/16/18
to Selenium Users
hi to all.. i have doubts in selenium

if i automate an website using selenium... how much of scripts i need to write?

Scott Babcock

unread,
Feb 16, 2018, 12:08:58 PM2/16/18
to Selenium Users
Selenium WebDriver is an automation API. You use it to interact with web applications as if your scripted actions were being performed by a human user. The API provides the tools, and you apply these tools to perform the necessary actions to fulfill the requirements of your scenario. This is accomplished through code of some sort. You'll need to write as much code as is needed by each specific scenario.

Selenium WebDriver doesn't provide record/playback functionality, so you'll have to write code for every action you need to perform. However, the WebDriver API is not terribly large or complicated, and there is massive amounts of examples, articles, and documentation to help you put it all together.

Shobhit

unread,
Feb 16, 2018, 4:14:46 PM2/16/18
to Selenium Users
Hi, 
     It totally depends on the frameowork , kind of application under test, no of test cases identified for automation.

Vikram

unread,
Feb 19, 2018, 6:07:13 AM2/19/18
to Selenium Users
Before you start writing code I suggest first start following BDD approach and write down "User Stories" to be automated.

Then you can decide whether to automate those on UI / API level.

I feel strange that why many people still wants to keep test cases ( user stories ) separated from automation script, even when Cucumber tool keep both these critical components of testing in sync every day.

Regards,
Vikram

⇜Krishnan Mahadevan⇝

unread,
Feb 19, 2018, 7:20:31 AM2/19/18
to Selenium Users
Vikram,

I feel strange that why many people still wants to keep test cases ( user stories ) separated from automation script, even when Cucumber tool keep both these critical components of testing in sync every day.

Cucumber does not do this. You as an automation engineer would basically be responsible for tying down individual gherkin steps to their corresponding step definitions. So its still essentially the tester having to do this. 

BDD as a concept has its advantages, but that doesn't mean that the BDD implementation in a particular language should do so as as well. For e.g., the cucumber java implementation lacks several things that a regular automation test would be able to leverage upon such as building test dependencies, data driven tests (yes examples are there in cucumber but I feel they aren't as versatile as a data driven test written using TestNG for e.g.,), parallel execution of scenarios etc.,

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c92b1456-e6b6-410a-aa2d-51bb6be37667%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vikram

unread,
Feb 19, 2018, 12:23:11 PM2/19/18
to Selenium Users

BDD is more about collaboration between 3 Amigos to make sure team is delivering what is needed at first place.

Cucumber has got all the options available for parallel run ( there are libraries written on top of it ) , data driven is also possible ( Cucumber data table )

Basically Cucumber creates strong bridge between user stories / test cases and automation scripts, which helps in better quality and avoiding "You Burn, I Scrape"

Regards,
Vikram


On Monday, February 19, 2018 at 1:20:31 PM UTC+1, Krishnan Mahadevan wrote:
Vikram,

I feel strange that why many people still wants to keep test cases ( user stories ) separated from automation script, even when Cucumber tool keep both these critical components of testing in sync every day.

Cucumber does not do this. You as an automation engineer would basically be responsible for tying down individual gherkin steps to their corresponding step definitions. So its still essentially the tester having to do this. 

BDD as a concept has its advantages, but that doesn't mean that the BDD implementation in a particular language should do so as as well. For e.g., the cucumber java implementation lacks several things that a regular automation test would be able to leverage upon such as building test dependencies, data driven tests (yes examples are there in cucumber but I feel they aren't as versatile as a data driven test written using TestNG for e.g.,), parallel execution of scenarios etc.,

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Mon, Feb 19, 2018 at 4:37 PM, Vikram <vikra...@gmail.com> wrote:
Before you start writing code I suggest first start following BDD approach and write down "User Stories" to be automated.

Then you can decide whether to automate those on UI / API level.

I feel strange that why many people still wants to keep test cases ( user stories ) separated from automation script, even when Cucumber tool keep both these critical components of testing in sync every day.

Regards,
Vikram

On Friday, February 16, 2018 at 8:09:47 AM UTC+1, software tester wrote:
hi to all.. i have doubts in selenium

if i automate an website using selenium... how much of scripts i need to write?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

⇜Krishnan Mahadevan⇝

unread,
Feb 19, 2018, 12:29:22 PM2/19/18
to seleniu...@googlegroups.com
Do you want to point me to a cucumber Java library that supports parallel execution at scenario level ?

How about also pointing me to a library that let's me build dependencies between scenarios i.e., execute scenario Y only if X passed. 

Also what if I want to run a bunch of scenarios with each sets of data from a data source ? Do you have anything that you could point me to ?

All of this in Java of course, since that's the only known devil for me. 



For more options, visit https://groups.google.com/d/optout.
--

Vikram

unread,
Feb 20, 2018, 5:31:34 AM2/20/18
to Selenium Users

The purpose of Java / other selenium supported language and Cucumber are different, one should use individual tool's strong points to achieve unique task/s related to user story optimally.

https://github.com/temyers/cucumber-jvm-parallel-plugin

https://github.com/trivago/cucable-plugin

These 2 are for feature files parallel run.

My main point of argument is keeping test cases / user stories in sync along with automation scripts instead of maintaining it separately.

I'm following BDD since last 2+ years for both web, mobile and api projects and find it much better than traditional way of software testing practices

Regards,
Vikram

⇜Krishnan Mahadevan⇝

unread,
Feb 20, 2018, 5:43:00 AM2/20/18
to Selenium Users
The purpose of Java / other selenium supported language and Cucumber are different, one should use individual tool's strong points to achieve unique task/s related to user story optimally.

IMO, a tester chooses a test library that best supports their usecase. So if dependencies/ parallel execution are things that are absolutely needed and if Cucumber Java bindings cannot support them (which is true AFAIK), then there's no point in trying to adopt Cucumber. So it makes every sense for a person to basically skip using Cucumber.

My point is very simple, which you seem to be re-iterating as well. Pick a tool that helps you solve your problem. So the only reason why you may find some folks not using Cucumber is perhaps because Cucumber doesn't fit the bill for them.
Yes but neither of them support parallelism at scenario level. I made a maiden effort to plug that gap when I built cucumber-roadrunner and let users run scenarios in parallel as well. But that's a different story.

My main point of argument is keeping test cases / user stories in sync along with automation scripts instead of maintaining it separately.
I'm following BDD since last 2+ years for both web, mobile and api projects and find it much better than traditional way of software testing practices

Good to hear that it worked for you. But like I said before, if my primary requirements are around parallel execution, a complex test execution graph which has dependencies involved and which requires extensive support for data driven (more complex than what examples/data tables has to offer) and if my programming language is Java, then I would not choose cucumber.
Keeping test cases/user stories together in sync is a good thing. But Cucumber is not the only way of achieving it. Good engineering discipline will also help maintain that. 

BDD is one of the ways in which people approach their development/testing. Am not against that. But there are other ways of doing things as well.

I guess I have said enough here :) Let me not hijack this thread. I rest my case !


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/94219af1-7453-425a-9bc5-a5647b8e79ed%40googlegroups.com.

Vikram

unread,
Feb 21, 2018, 4:34:19 AM2/21/18
to Selenium Users

Just to clarify about the point Cucumber does not support parallel run so one should not use it.

This is not at all correct .


Refer to my repo

https://github.com/vikramvi/junit-webtests-parallel-grid-docker-jenkins-debug/blob/master/cucumber-webtests/pom.xml

One can use other plugin like maven surefire / maven failsafe along with Cucumber to run feature files in parallel mode with Grid setup


I will let community decide if they would like to collaborate closely within team which is needed in scrum or continue working in fast waterfall in agile world :)

Regards,
Vikram

Vikram

unread,
Feb 21, 2018, 4:43:39 AM2/21/18
to Selenium Users

One more repo https://github.com/vikramvi/serenity-cucumber-wl showcasing Cucubmer parallel run in docker container environment with Selenium Grid

This was my first experience with BDD ( Cucumber usage with UI automation )

https://stackoverflow.com/questions/38835682/how-to-generate-documentation-from-cucumber-gherkin

Using yard cucumber I had hosted "Living Documentation" within company network thus avoiding to use costly test cases management tool

Regards,
Vikram

Benjamin Bischoff

unread,
Jun 26, 2018, 8:45:54 AM6/26/18
to Selenium Users
Hello all,

I am the author of Cucable (https://github.com/trivago/cucable-plugin) and it DOES support running scenarios in parallel. It even splits scenario outlines into individual scenarios.
In fact, this is one of the reasons why I created it ;-)

Best,
Benjamin

⇜Krishnan Mahadevan⇝

unread,
Jun 26, 2018, 8:57:53 AM6/26/18
to Selenium Users
Benjamin,

Good to hear that. In-fact I also went ahead and built my own variant of a scenario level parallel execution support for Cucumber by building Cucumber-roadrunner.


I am yet to go back to it to upgrading it so that its compliant with the latest released version of Cucumber though! Hopefully I will get around to doing that.
 


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages