Showing posts with label practices. Show all posts
Showing posts with label practices. Show all posts

Friday, February 25, 2022

Evolving TDD

I had posted an update to my earlier blog post about TDD & its variations. Well, not surprisingly, I have encountered some more variations of this amazing practice. Here is the updated list with the new additions called out.

ATDD = Anti-Trust Driven Development
BDD = Benefit Driven Development
CDD = Cribbing Driven Development
CDD = Control Driven Development
IDD = Indifference Driven Development
ODD = Optimism Driven Development
PDD = Punishment Driven Development
RDD = Reporting Driven Development
SDD = Slide(s) Driven Development
SDD = Short-cut Driven Development

A few variants kindly shared by the community members:
FDD = Food Driven Development
SGDD = Style Guide Driven Development
http://styleguidedrivendevelopment.net/

To recap, here is the original list
ATDD = Acceptance Test Driven Development
BDD = Behavior / Business Driven Development
BDD = Blame Driven Development
BDD = Buzzword Driven Development
CDD = Complexity Driven Development
CDD = Calendar Driven Development
CDD = Checklist Driven Development
CDD = Chadi (stick) Driven Development
CDD = Constraint Driven Development
CPDD / CDD = Copy-Paste Driven Development
DDD = Demo Driven Development
DDD = Date Driven Development
DDD = Defect Driven Development
DDD = Document (PRD) Driven Development
EDD = Escalation Driven Development
EDD = Estimation Driven Development
EDD = Excel Driven Development
FDD = Fake-it Driven Development
FDD = Fashion Driven Development
FDD = Fear Driven Development
FDD = Footwear (punishment) Driven Development
HDD = Hope Driven Development (fingers crossed)
IDD = Instinct Driven Development
IDD = Issue Driven Development
JDD = Jira Driven Development
MDD = Metrics Driven Development
MDD = Manager / Management Driven Development
MDD = Mandate Driven Development
MDD = Meeting Driven Development
NDD = No-Drive (towards) Development
PDD = Patch(work) Driven Development
PDD = Plan Driven Development
PDD = Prayer Driven Development
PDD = Process Driven Development
PDD = Profanity Driven Development
RDD = Resource Driven Development
RDD = Resume Driven Development
SDD = Stackoverflow Driven Development
SDD = Stakeholder Driven Development
SDD = Swallow-exceptions Driven Development
SDD = Sprint Driven Development
TDD = Trust Driven Development
VDD = Velocity Driven Development

Monday, February 21, 2022

Why not to use PageFactory and FindsBy in Selenium WebDriver

Many users of Selenium WebDriver may be using the PageFactory created by Simon Stewart. However, it is not a good idea to use it.

You may be thinking why should I not use it? It is so easy to use it, and its popular.

Well, here are 2 reasons why you should not use the PageFactory:

Reason #1. Simon Stewart (https://twitter.com/shs96c), the creator of WebDriver, and the PageFactory himself says, do not use it. It is not recommended.

The `FindsBy` annotation isn't recommended, because the PageFactory class is really badly implemented and inflexible, but it's not going away in the java bindings.

The `FindsByX` interfaces are going away. Better to use a `By` locator and use that.


PageFactory is really badly implemented
 

https://twitter.com/shs96c/status/1196865907185868801


Reason #2: While Reason #1 should have been sufficient, many people implementing automation using Selenium WebDriver do not know, or did not pay heed to what Simon said. So another WebDriver & WATIR contributor, Titus Fortner (https://twitter.com/titusfortner) explained in detail why using PageFactory is not a good idea in his blog post - https://titusfortner.com/2021/02/03/page-factory-optimization.html

 

I sincerely hope these reasons are sufficient for you to move away from the PageFactory and use something more efficient. 

 

Thursday, January 7, 2021

TDD and its variations in 2021

Back in 2018, I had written a blog post about Test Driven Development (TDD) and its modern variations.

Today I have some more insights on the variations.

To recap, here is the original list

BDD = Behavior / Business Driven Development
BDD = Blame Driven Development
BDD = Buzzword Driven Development
CDD = Calendar Driven Development
CDD = Checklist Driven Development
CDD = Chadi (stick) Driven Development
CDD = Constraint Driven Development
DDD = Date Driven Development
DDD = Defect Driven Development
DDD = Document (PRD) Driven Development
EDD = Escalation Driven Development
EDD = Estimation Driven Development
EDD = Excel Driven Development
FDD = Fashion Driven Development
FDD = Fear Driven Development
FDD = Footwear (punishment) Driven Development
HDD = Hope Driven Development (fingers crossed)
IDD = Instinct Driven Development
IDD = Issue Driven Development
JDD = Jira Driven Development
MDD = Metrics Driven Development
MDD = Manager / Management Driven Development
NDD = No-Drive (towards) Development
PDD = Patch(work) Driven Development
PDD = Plan Driven Development
PDD = Prayer Driven Development
PDD = Process Driven Development
RDD = Resource Driven Development
RDD = Resume Driven Development
SDD = Stackoverflow Driven Development
SDD = Stakeholder Driven Development

Here are the new variations I have come across:

ATDD = Acceptance Test Driven Development
CDD = Complexity Driven Development
CPDD / CDD = Copy-Paste Driven Development
DDD = Demo Driven Development
FDD = Fake-it Driven Development
MDD = Mandate Driven Development

MDD = Meeting Driven Development
PDD = Profanity Driven Development
SDD = Swallow-exceptions Driven Development
SDD = Sprint Driven Development
TDD = Trust Driven Development
VDD = Velocity Driven Development 

Have you come across any of the above variants? Anything I have missed?

Tuesday, March 19, 2019

Collaboration - A Taboo!

In AgileIndia 2019 in Bangalore, as part of the Agile Mindset theme, I played a tweak of the Taboo game - to make it a Collaboration game.

Abstract: 

When one has fun at work, work becomes fun. However, daily pressures, metrics, KPIs, and what not, have dissolved the fun, and made work drudgery in various ways. 

This creates stress for individuals, in teams, and across teams, there is mistrust, unnecessary competition, blame, finger-pointing ….

What better way to learn, and re-learn the basics of life, work, team-work - than to play a game, have fun, and correlate it with how life and work indeed should be treated as a game, and we should have fun in this journey. Only then can people truly succeed, and so can organisations.

Here, we will play a game – “Collaboration - A Taboo!” – where you will 

  • Re-learn collaboration techniques via a game! 
  • Learning applicable for individuals and teams, in small or big organisations
  • Re-live your childhood when playing this game

Be prepared for a twist which will leave you thinking!

Slides:



Tuesday, March 27, 2018

Test Driven Development (TDD) and its modern variations

NOTE / RECOMMENDATION - This blog post is to be read with your funny side switched on!

First - lets answer the question - What is TDD?
Directly from https://en.wikipedia.org/wiki/Test-driven_development - Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: Requirements are turned into very specific test cases, then the software is improved to pass the new tests, only. This is opposed to software development that allows software to be added that is not proven to meet requirements.
American software engineer Kent Beck, who is credited with having developed or "rediscovered"[1] the technique, stated in 2003 that TDD encourages simple designs and inspires confidence.
Test-driven development is related to the test-first programming concepts of extreme programming, begun in 1999,[3] but more recently has created more general interest in its own right.

However, over the years, fortunately or unfortunately, I have also come across various different techniques (used consciously / unconsciously) in Software Development, to get the work done. Some of them are listed below - in alphabetical order:

BDD = Behavior / Business Driven Development
BDD = Blame Driven Development
BDD = Buzzword Driven Development
CDD = Calendar Driven Development
CDD = Checklist Driven Development
CDD = Chadi (stick) Driven Development
CDD = Constraint Driven Development
DDD = Date Driven Development
DDD = Defect Driven Development
DDD = Document (PRD) Driven Development
EDD = Escalation Driven Development
EDD = Estimation Driven Development
EDD = Excel Driven Development
FDD = Fashion Driven Development
FDD = Fear Driven Development
FDD = Footwear (punishment) Driven Development
HDD = Hope Driven Development (fingers crossed)
IDD = Instinct Driven Development
IDD = Issue Driven Development
JDD = Jira Driven Development
MDD = Metrics Driven Development
MDD = Manager / Management Driven Development
PDD = Patch(work) Driven Development
PDD = Plan Driven Development
PDD = Prayer Driven Development
PDD = Process Driven Development
RDD = Resource Driven Development
RDD = Resume Driven Development
SDD = Stackoverflow Driven Development
SDD = Stakeholder Driven Development

And the last one -
NDD = No-Drive (towards) Development

Any other style of development you have come across in your experience?
Hope you had fun reading the list! 


Tuesday, August 9, 2016

Sharing the pain in Automating with Protractor & WebDriver

As mentioned in my earlier post titled "Taking Protractor to the next level", on 25th June 2016, Nikitha Iyer and I spoke in Selenium Conference 2016, Bangalore, India on "Sharing the pain in Automating with Protractor & WebDriver".

The video is finally available and I am now able to share (see below) all the details of the talk from one post.



Abstract

There is a saying ..."Sukh baatne se badhta hai, dukh baatne se kam hota hai", translated as - "happiness increases & sadness reduces on sharing with others".

We want to take this opportunity to share with our experiences - the good and the bad, in the journey of building a Test Automation framework for an AngularJS based application. 

We will learn, by a case study, what thought process we applied on the given context (product, team, skills, capabilities, long term vision) to come up with an appropriate Test Automation Strategy. This Test Automation strategy covered all aspects of Test Automation - Unit, Integration, UI - i.e. End-2-End tests (E2E).

Next, we will share how we went about narrowing-down, and eventually selecting a specific Tech Stack + Tools (Javascript / Jasmine / Protractor / Selenium-WebDriver) to accomplish the Test Automation for the product.

Lastly, we will share the challenges that came up in the implementation of the Test Automation, and how we overcame them. This will also include how we managed to get the tests running in Jenkins - a Continuous Integration tool. 
This discussion is applicable to all team members who are working on Test Automation!

P.S. We will be attempting to make a sample protractor-based automation framework available on github for anyone to use as a starting point for setting up protractor-based Test Automation framework.


Slides




Video

Tuesday, June 28, 2016

Taking Protractor to the next level

As I got onto a project early this year - my paths crossed again with Protractor / Angular / JavaScript. Despite my past experiences with this tech stack, I needed to remain positive when approaching this challenge.

In this case, the context was quite different. That said, the challenges, though reduced compared to my first attempt at using Protractor effectively, were still around. 

I had posted a set of questions on my blog, various LinkedIn and facebook groups - and got a lot of suggestions and advice how to proceed. Thanks to all of them, it did make my life easier.

Then, as part of Selenium Conference 2016 held in Bangalore on 24-25th June 2016, my friend and colleague - +Nikita Iyer and I spoke about "Sharing the Pain of Automating with Protractor & WebDriver". The intention was multi-fold:
  • We wanted to share what challenges we had faced on the team when using Protractor, and also how we overcame certain challenges. This was to help others in similar situations to learn from our mistakes & solutions.
  • We also wanted to learn from the attendees what other challenges & solutions they had come up with in their experiences with this Protractor tool-stack.
I am very happy to say that we were successful in achieving both these objectives quite successfully.

Below is the details from the talk.

Abstract

There is a saying ..."Sukh baatne se badhta hai, dukh baatne se kam hota hai", translated as - "happiness increases & sadness reduces on sharing with others".

We want to take this opportunity to share with our experiences - the good and the bad, in the journey of building a Test Automation framework for an AngularJS based application. 

We will learn, by a case study, what thought process we applied on the given context (product, team, skills, capabilities, long term vision) to come up with an appropriate Test Automation Strategy. This Test Automation strategy covered all aspects of Test Automation - Unit, Integration, UI - i.e. End-2-End tests (E2E).

Next, we will share how we went about narrowing-down, and eventually selecting a specific Tech Stack + Tools (Javascript / Jasmine / Protractor / Selenium-WebDriver) to accomplish the Test Automation for the product.

Lastly, we will share the challenges that came up in the implementation of the Test Automation, and how we overcame them. This will also include how we managed to get the tests running in Jenkins - a Continuous Integration tool. 
This discussion is applicable to all team members who are working on Test Automation!

P.S. We will be attempting to make a sample protractor-based automation framework available on github for anyone to use as a starting point for setting up protractor-based Test Automation framework.


Slides


Video

- will be updated once available

Pictures




Monday, March 14, 2016

Protractor for Angular apps?

Already asked these questions in the vodQA group on LinkedIn - but thought to repeat the same here as well - in case someone else also reads this, and has some thoughts.

I am experimenting (again) with Protractor for automation against Angular-based web-apps. This time around, my comfortness with Javascript is better (by a couple more % than before) - so I am better prepped for this challenge. 

That said, I am interested in knowing a few things on this:

  • Has anyone in the group worked with protractor recently? 
  • What has been your experiences in working with it? 
  • Who are the roles involved in the automation implementation, execution and maintenance? 
  • What are the typical utilities you built in this framework?
  • How have you been modelling you page-object pattern with JS / protractor based frameworks? Or, is there some other better set of patterns for JS that should be used?
  • How did you build your page objects? How did you build and manage the composition / nesting of pages? Did the method of a page return an appropriate page object?
  • How many tests exist in your framework? 
  • Do you run your tests in parallel?
  • Do your tests run in CI? If yes, which driver do you use? Protractor site discourages the use of phantomJS. 
  • Would it be possible to share some (non-confidential) examples of how you built your Page Objects? How are your specs written? Any example of that possible to see?
  • Did anyone manage to run their tests against Safari / IE11 as well?
  • What about soft asserts? Did you implement this?
  • I saw a strange issue when running my test against chrome - I got the element is not clickable at xxx coordinates. However the same test ran against Firefox and phantomjs. Anyone seen this before?
  • Given that protractor site does not recommend using phantomJS driver much, anyone used xvfb for running their tests in CI?
  • What reporters do you use?