SlideShare a Scribd company logo
1 of 3
Download to read offline
42 Testing Experience – 27/2014
By Rudolf de Schipper & Abdelkrim Boujraf
Test-Driven Developments are Inefficient;
Behavior-Driven Developments are a Beacon of Hope?
The StratEx Experience (A Public-Private SaaS and On-Premises Application) – Part I
At StratEx (www.stratexapp.com), apart from developing the StratEx
application, we obviously worry about quality and testing the app.
After all, we are committed to providing quality to our users.
StratEx uses a concept of code generation to shorten the development
cycle, hereby being able to quickly implement new features and func-
tionality. It also provides for a nice uniform user interface, because
we have kept the code generation as simple as we dared to. So it is
not very easy to create a (generated) screen that looks very different
from the others.
The code generation concept gives us reliable code (the part that is
generated at least), leading also to reduced testing time. Still, next to
coding efficiently, we wanted to find ways to efficiently test as well.
The obvious (from our perspective at least) solution was to automate
and to generate our tests. While this sounds easy, in reality it is not so
obvious. We spent quite some time figuring out what the best testing
strategy could be and how to implement this (using test automation)
At first we settled for user interface (UI) testing, using Selenium. We
hand-recorded some testing scenarios and included them into our
continuous integration build process (I will talk about this in another
post). It helped in deploying builds that were smoke-tested, but it did
not help at all when we made changes to the screens. And this was
exactly what we were doing all the time, because it was easy to do
with our generated code and we needed this flexibility for our users!
And, of course, there is no way that we could compromise on this, not
even to ensure our code was tested automatically. Yes, you are reading
this right – we dare to deploy code that is not fully end-to-end tested!
We prefer to deploy often and fast, with the risk that our users find a
bug from time to time.
Still we were not happy about this, so we kept on looking for better
solutions. A long investigation ensued, looking at better (faster) ways
to test, ways to generate tests, ways to improve our hand-written
code, reading many books and articles on testing (see the books and
articles lists below). Even today the search is not over, and we still did
not manage to generate our tests (fully). We do run automated tests
these days, however, before deploying a new build.
Meanwhile, we would like to share some observations on the various
test/development approaches we have encountered:
TDD (Test-Driven Design/Development)
The basic premise of TDD methodology is that your development is
essentially driven by a number of (unit) tests. You first write the unit
tests,andthenruntheseagainstyour(notyetexistent)code.Obviously
the tests fail, and your next efforts are directed to writing code that
makes the tests pass. TDD and its strong focus on unit testing is, in
our opinion, an overrated concept. It is easily explained and therefore
quickly attracts enthusiastic followers. The big gap in its approach
is that (unit) tests are also code. And this code must be written and
maintained, and it will contain bugs. So if we end up on a project
where developers spend x% of their time writing new (test) code and
not working on writing production code, we have to ask what the
point of this is. In our view, you are just producing more lines of code
and, therefore, more bugs.
Another problem or weakness of TDD is that there are a lot of bad
examples of TDD around. Many sites that advocate TDD give sample
code that essentially goes like this: you have a unit test that needs to
test a new class. The unit tests usually set a property on the class to be
tested and try to read back this property. With any class of reasonable
size, this will give quite quickly a nice set of unit tests. But, let’s back up
a bit, what exactly are we testing here? Well, all things being equal, in
such scenarios we are testing whether the code is capable of accepting
a value and the possibility of retrieving this value. This comes down
to testing the compiler or the interpreter, because, as a developer, the
amountofcodeyouwrote(anditscomplexity)toachievethisbehavior
isclosetozero.Inotherwords,suchunittestsonlyprovideafalsesense
of security, as in the end you are not testing anything.
Oneargumentagainstthisisthatovertimesuchgetter/settercodemay
evolve into something more complicated and then the unit test code
becomes useful to avoid regression. Our experience shows, however,
that a) this rarely happens at a scale large enough to make the initial
effort worthwhile and b) if you are making such drastic change to your
code, moving from elementary getter/setter pairs to more involved
computations, it is very likely that you want your unit test to break.
What is the moral of this story for unit tests? Should we abandon
them altogether? No, but we maintain that it requires some thought
about what exactly you want to unit-test. 100% unit test coverage for
us means we are wasting effort.
Let us take another point. TDD as a concept is not bad, in the sense
that it forces you to think about what you actually need to build and
how you can get it accepted (tested).
We believe, however, that its fundamental approach puts too much
“power” in the hands of the developer. It gives the strong impression
that the developer (under time pressure) is tempted to build “some-
thing” that passes the test, and that is all. So if the test is wrong, the
developerisnottoblame!Webelievethatthisundervaluesthestrength
of a good developer and gives anyone with a code editor the chance to
position himself as a developer. This cannot be right.
Looking for software testability, we found another issue that we could
not accept. It is the burden that the approach of producing “testable
software”putsonyourarchitecture.Tomakeasystem“testable”isone
thing,buttoenforcerock-hardprinciplesonthearchitecture(Inversion
of Control, Dependency Injection, or a very strict separation of layers)
Testing Experience – 27/2014 43
in our opinion only dramatically increases the complexity of the code
and, very importantly, it serves no purpose for the end objective of
the system, namely to solve a business problem. For highly complex
systems,suchapproachesareprobablydefendableandevenverygood.
However, in the fast-paced, ever-changing world we live in, the least of
our problems is whether a software architecture can be sustained for
tenyears,ifwealreadyknowthatintwoyears’timetheentirebusiness
system will be obsolete. We may even argue that in two years’ time the
insights on what a good architecture should be will have dramatically
changed. So why bother with this? We should concentrate on software
that works, and preferably that ships in record time.
So we concluded that any testing methodology that requires exten-
sive re-engineering of what is basically a workable and dependable
architecture should be looked upon with a certain suspicion. As a
consequence, we do not use unit tests that require our code to be
able to work without a database. We do not use “mocking” with all
its complexities and we do not spend time on making our classes and
objects independent of each other. It does not make for the most “cor-
rect” code, we know. However, we do not mind. If tomorrow we find
a better way to do it, we will change our code templates and simply
re-generate our application code (well, most of it). So we are not overly
worried about having the right architecture to begin with – in fact we
have already changed it twice, but that is another blog.
Sodoesthismeantheendof test-drivendevelopment?Notatall.There
are things you can test very well with unit tests. Plus, there is a new de-
scendant that we have also investigated, and which shows promise for
otherareaswewouldwanttotest:behavior-drivendevelopment(BDD).
BDD has the same initial outset as TDD, in the sense that it starts the
developmentprocesswiththedefinitionoftheteststhefutureapplica-
tion will need to pass to be accepted. But BDD is more appropriate for
thistaskbecauseitseemstofocusmoreonthefunctionalityofasystem
than on how it should be built. So it is less prone to the criticism we
have about TDD. For one thing, it provides for a way to bridge the gap
between users and developers by using a specific language in which
to specify tests (or acceptance criteria, if you wish). This language,
Gherkin (github.com/cucumber/cucumber/wiki/Gherkin), is so simple
that the learning curve is as flat is it comes, meaning that everyone
can be taught to understand it in record time. Writing proper Gherkin
requires a bit more time.
For us, its main advantage is that Gherkin provides for a way to com-
municatethefunctionalityofasystematalevelthatisunderstandable
to a developer. Its main downside is that you will end up with A LOT of
Gherkin to fully describe a system of a reasonable size.
In the end, this is the main criticism we have about most of these
“methodologies”,(UMLincluded).Ifyouhaveasystemthatgoesbeyond
asimplecalculator(theusualexample),nomodelinglanguage(asthey
all are, in a way) is powerful enough to describe a full and complete
system in such a way that you can understand and describe it more
quickly than by looking at the screens and the code that implements
these screens.
So the search goes on …	 ◼
Read Part II of this article in the December issue (No. 28)!
Referenced books
▪
▪ “The Cucumber Book” (Wynne and Hellesoy)
▪
▪ “Application testing with Capybara” (Robbins)
▪
▪ “Beautiful testing” (Robbins and Riley)
▪
▪ “Experiences of Test Automation (Graham and Fewster)
▪
▪ “How Google tests software” (Whittaker, Arbon et al.)
▪
▪ “Selenium Testing Tools Cookbook” (Gundecha)
Referenced articles
▪
▪ “Model Driven Software engineering” (Brambilla et al.)
▪
▪ “Continuous Delivery” (Humble and Farley)
▪
▪ “Domain Specific Languages” (Fowler)
▪
▪ “Domain Specific Modeling” (Kelly et al)
▪
▪ “Language Implementation Patterns” (Parr)
Rudolf de Schipper has extensive experience in
project management, consulting, QA, and soft-
waredevelopment.Hehasexperienceinmanag-
ing large multinational projects and likes work-
ing in a team. Rudolf has a strong analytical
attitude, with interest in domains such as the
public sector, finance and e-business.
He has used object-oriented techniques for design and develop-
ment in an international context. Apart from the management
aspects of IT-related projects, his interests span program manage-
ment, quality management, and business consulting, as well as
architecture and development. Keeping abreast with technical
work, Rudolf has worked with the StratEx team, developing the
StratEx application (www.stratexapp.com),its architecture,and the
code generation tool that is used. In the process, he has learned
and experienced many of the difficulties related to serious soft-
ware design and development, including the challenges of testing.
LinkedIn: be.linkedin.com/pub/rudolf-de-schipper/3/6a9/6a9
Abdelkrim Boujraf owns companies developing
softwarelikeStratEx(programandproject man-
agement) and SIMOGGA (lean operations man-
agement). He has more than 15 years of experi-
ence in different IT positions, from software
engineering to program management in man-
agement consulting and software manufactur-
ing firms. His fields of expertise are operational excellence and col-
laborative consumption. Abdelkrim holds an MBA as well as a
master’s in IT & Human Sciences. He is a scientific advisor for the
Université Libre de Bruxelles where he is expected to provide occa-
sional assistance in teaching or scientific research for spin-offs.
LinkedIn: be.linkedin.com/in/abdelkrimboujraf
> about the authors

More Related Content

Similar to 42 Testing Experience – Behavior-Driven Developments Hope

Test driven development and react js application go hand in hand
Test driven development and react js application go hand in handTest driven development and react js application go hand in hand
Test driven development and react js application go hand in handKaty Slemon
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Applitools
 
SELJE_Database_Unit_Testing.pdf
SELJE_Database_Unit_Testing.pdfSELJE_Database_Unit_Testing.pdf
SELJE_Database_Unit_Testing.pdfEric Selje
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Bridging the communication gap
Bridging the communication gapBridging the communication gap
Bridging the communication gapGuillagui San
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentEffective
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentJohn Blanco
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentEffectiveUI
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionPyxis Technologies
 
Technical Report: My Container
Technical Report: My ContainerTechnical Report: My Container
Technical Report: My ContainerFabio Simeoni
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Robin O'Brien
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
Testing Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksTesting Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksŁukasz Morawski
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovSvetlin Nakov
 
Outside-in Testing in Vue with Cypress
Outside-in Testing in Vue with CypressOutside-in Testing in Vue with Cypress
Outside-in Testing in Vue with CypressJosh Justice
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandDavid O'Dowd
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012Justin Gordon
 

Similar to 42 Testing Experience – Behavior-Driven Developments Hope (20)

Test driven development and react js application go hand in hand
Test driven development and react js application go hand in handTest driven development and react js application go hand in hand
Test driven development and react js application go hand in hand
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
 
SELJE_Database_Unit_Testing.pdf
SELJE_Database_Unit_Testing.pdfSELJE_Database_Unit_Testing.pdf
SELJE_Database_Unit_Testing.pdf
 
Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
 
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Bridging the communication gap
Bridging the communication gapBridging the communication gap
Bridging the communication gap
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Technical Report: My Container
Technical Report: My ContainerTechnical Report: My Container
Technical Report: My Container
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Testing Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksTesting Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation Frameworks
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
Outside-in Testing in Vue with Cypress
Outside-in Testing in Vue with CypressOutside-in Testing in Vue with Cypress
Outside-in Testing in Vue with Cypress
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
 

More from Abdelkrim Boujraf

ALT-F1.BE : The Accelerator (Google Cloud Platform)
ALT-F1.BE : The Accelerator (Google Cloud Platform)ALT-F1.BE : The Accelerator (Google Cloud Platform)
ALT-F1.BE : The Accelerator (Google Cloud Platform)Abdelkrim Boujraf
 
Abdelkrim Boujraf references-in-research-papers-v0.03
Abdelkrim Boujraf references-in-research-papers-v0.03Abdelkrim Boujraf references-in-research-papers-v0.03
Abdelkrim Boujraf references-in-research-papers-v0.03Abdelkrim Boujraf
 
ALT-F1 Google AppEngine-Cloud-computing
ALT-F1 Google AppEngine-Cloud-computingALT-F1 Google AppEngine-Cloud-computing
ALT-F1 Google AppEngine-Cloud-computingAbdelkrim Boujraf
 
What you need to know about an IT experience - 2012-11-29 - universite-lille
What you need to know about an IT experience - 2012-11-29  - universite-lilleWhat you need to know about an IT experience - 2012-11-29  - universite-lille
What you need to know about an IT experience - 2012-11-29 - universite-lilleAbdelkrim Boujraf
 
ALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngineALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngineAbdelkrim Boujraf
 
ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...
ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...
ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...Abdelkrim Boujraf
 
ALT-F1: Integration Predix and Aviation Dataset
ALT-F1: Integration Predix and Aviation DatasetALT-F1: Integration Predix and Aviation Dataset
ALT-F1: Integration Predix and Aviation DatasetAbdelkrim Boujraf
 
Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03
Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03
Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03Abdelkrim Boujraf
 
ALT-F1: Integration Predix and SIMOGGA Solutions
ALT-F1: Integration Predix and SIMOGGA SolutionsALT-F1: Integration Predix and SIMOGGA Solutions
ALT-F1: Integration Predix and SIMOGGA SolutionsAbdelkrim Boujraf
 
StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)
StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)
StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)Abdelkrim Boujraf
 
StratEx, PMO product-features-long-en-1.06
StratEx, PMO product-features-long-en-1.06StratEx, PMO product-features-long-en-1.06
StratEx, PMO product-features-long-en-1.06Abdelkrim Boujraf
 
AMIA Systems, Layout Design, Planning & Scheduling, Appliance
AMIA Systems, Layout Design, Planning & Scheduling, ApplianceAMIA Systems, Layout Design, Planning & Scheduling, Appliance
AMIA Systems, Layout Design, Planning & Scheduling, ApplianceAbdelkrim Boujraf
 
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4Abdelkrim Boujraf
 
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4Abdelkrim Boujraf
 
StratEx, Project management - HORIZON 2020 v1.02 (SaaS and On-premise)
StratEx, Project management - HORIZON 2020  v1.02 (SaaS and On-premise)StratEx, Project management - HORIZON 2020  v1.02 (SaaS and On-premise)
StratEx, Project management - HORIZON 2020 v1.02 (SaaS and On-premise)Abdelkrim Boujraf
 
StratEx, Project management - Features list v1.06
StratEx, Project management - Features list v1.06StratEx, Project management - Features list v1.06
StratEx, Project management - Features list v1.06Abdelkrim Boujraf
 
ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18Abdelkrim Boujraf
 
StratEx, PMO Easily and Affordably
StratEx, PMO Easily and AffordablyStratEx, PMO Easily and Affordably
StratEx, PMO Easily and AffordablyAbdelkrim Boujraf
 
ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18Abdelkrim Boujraf
 

More from Abdelkrim Boujraf (20)

ALT-F1.BE : The Accelerator (Google Cloud Platform)
ALT-F1.BE : The Accelerator (Google Cloud Platform)ALT-F1.BE : The Accelerator (Google Cloud Platform)
ALT-F1.BE : The Accelerator (Google Cloud Platform)
 
Abdelkrim Boujraf references-in-research-papers-v0.03
Abdelkrim Boujraf references-in-research-papers-v0.03Abdelkrim Boujraf references-in-research-papers-v0.03
Abdelkrim Boujraf references-in-research-papers-v0.03
 
ALT-F1 Google AppEngine-Cloud-computing
ALT-F1 Google AppEngine-Cloud-computingALT-F1 Google AppEngine-Cloud-computing
ALT-F1 Google AppEngine-Cloud-computing
 
What you need to know about an IT experience - 2012-11-29 - universite-lille
What you need to know about an IT experience - 2012-11-29  - universite-lilleWhat you need to know about an IT experience - 2012-11-29  - universite-lille
What you need to know about an IT experience - 2012-11-29 - universite-lille
 
ALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngineALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngine
 
ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...
ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...
ALT-F1: Visualize Quantify Optimize Facility layout and planning using GE Bri...
 
ALT-F1: Integration Predix and Aviation Dataset
ALT-F1: Integration Predix and Aviation DatasetALT-F1: Integration Predix and Aviation Dataset
ALT-F1: Integration Predix and Aviation Dataset
 
Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03
Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03
Reduce CO2 Emission of the Civial Aviation - GE Digital - Predix.io - v3.03
 
ALT-F1: Integration Predix and SIMOGGA Solutions
ALT-F1: Integration Predix and SIMOGGA SolutionsALT-F1: Integration Predix and SIMOGGA Solutions
ALT-F1: Integration Predix and SIMOGGA Solutions
 
StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)
StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)
StratEx, PMO EASILY & AFFORDABLY (SaaS and On-premise)
 
StratEx, PMO product-features-long-en-1.06
StratEx, PMO product-features-long-en-1.06StratEx, PMO product-features-long-en-1.06
StratEx, PMO product-features-long-en-1.06
 
sis_factsheet_21122016_en
sis_factsheet_21122016_ensis_factsheet_21122016_en
sis_factsheet_21122016_en
 
AMIA Systems, Layout Design, Planning & Scheduling, Appliance
AMIA Systems, Layout Design, Planning & Scheduling, ApplianceAMIA Systems, Layout Design, Planning & Scheduling, Appliance
AMIA Systems, Layout Design, Planning & Scheduling, Appliance
 
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
 
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
_AMIA_Systems-Layout_Design-Planner-Appliance-ERP-MES-APS-EN-v1.4.4
 
StratEx, Project management - HORIZON 2020 v1.02 (SaaS and On-premise)
StratEx, Project management - HORIZON 2020  v1.02 (SaaS and On-premise)StratEx, Project management - HORIZON 2020  v1.02 (SaaS and On-premise)
StratEx, Project management - HORIZON 2020 v1.02 (SaaS and On-premise)
 
StratEx, Project management - Features list v1.06
StratEx, Project management - Features list v1.06StratEx, Project management - Features list v1.06
StratEx, Project management - Features list v1.06
 
ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18
 
StratEx, PMO Easily and Affordably
StratEx, PMO Easily and AffordablyStratEx, PMO Easily and Affordably
StratEx, PMO Easily and Affordably
 
ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18ALT-F1-StratEx-005-Value_proposition-2015-11-18
ALT-F1-StratEx-005-Value_proposition-2015-11-18
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Recently uploaded (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

42 Testing Experience – Behavior-Driven Developments Hope

  • 1.
  • 2. 42 Testing Experience – 27/2014 By Rudolf de Schipper & Abdelkrim Boujraf Test-Driven Developments are Inefficient; Behavior-Driven Developments are a Beacon of Hope? The StratEx Experience (A Public-Private SaaS and On-Premises Application) – Part I At StratEx (www.stratexapp.com), apart from developing the StratEx application, we obviously worry about quality and testing the app. After all, we are committed to providing quality to our users. StratEx uses a concept of code generation to shorten the development cycle, hereby being able to quickly implement new features and func- tionality. It also provides for a nice uniform user interface, because we have kept the code generation as simple as we dared to. So it is not very easy to create a (generated) screen that looks very different from the others. The code generation concept gives us reliable code (the part that is generated at least), leading also to reduced testing time. Still, next to coding efficiently, we wanted to find ways to efficiently test as well. The obvious (from our perspective at least) solution was to automate and to generate our tests. While this sounds easy, in reality it is not so obvious. We spent quite some time figuring out what the best testing strategy could be and how to implement this (using test automation) At first we settled for user interface (UI) testing, using Selenium. We hand-recorded some testing scenarios and included them into our continuous integration build process (I will talk about this in another post). It helped in deploying builds that were smoke-tested, but it did not help at all when we made changes to the screens. And this was exactly what we were doing all the time, because it was easy to do with our generated code and we needed this flexibility for our users! And, of course, there is no way that we could compromise on this, not even to ensure our code was tested automatically. Yes, you are reading this right – we dare to deploy code that is not fully end-to-end tested! We prefer to deploy often and fast, with the risk that our users find a bug from time to time. Still we were not happy about this, so we kept on looking for better solutions. A long investigation ensued, looking at better (faster) ways to test, ways to generate tests, ways to improve our hand-written code, reading many books and articles on testing (see the books and articles lists below). Even today the search is not over, and we still did not manage to generate our tests (fully). We do run automated tests these days, however, before deploying a new build. Meanwhile, we would like to share some observations on the various test/development approaches we have encountered: TDD (Test-Driven Design/Development) The basic premise of TDD methodology is that your development is essentially driven by a number of (unit) tests. You first write the unit tests,andthenruntheseagainstyour(notyetexistent)code.Obviously the tests fail, and your next efforts are directed to writing code that makes the tests pass. TDD and its strong focus on unit testing is, in our opinion, an overrated concept. It is easily explained and therefore quickly attracts enthusiastic followers. The big gap in its approach is that (unit) tests are also code. And this code must be written and maintained, and it will contain bugs. So if we end up on a project where developers spend x% of their time writing new (test) code and not working on writing production code, we have to ask what the point of this is. In our view, you are just producing more lines of code and, therefore, more bugs. Another problem or weakness of TDD is that there are a lot of bad examples of TDD around. Many sites that advocate TDD give sample code that essentially goes like this: you have a unit test that needs to test a new class. The unit tests usually set a property on the class to be tested and try to read back this property. With any class of reasonable size, this will give quite quickly a nice set of unit tests. But, let’s back up a bit, what exactly are we testing here? Well, all things being equal, in such scenarios we are testing whether the code is capable of accepting a value and the possibility of retrieving this value. This comes down to testing the compiler or the interpreter, because, as a developer, the amountofcodeyouwrote(anditscomplexity)toachievethisbehavior isclosetozero.Inotherwords,suchunittestsonlyprovideafalsesense of security, as in the end you are not testing anything. Oneargumentagainstthisisthatovertimesuchgetter/settercodemay evolve into something more complicated and then the unit test code becomes useful to avoid regression. Our experience shows, however, that a) this rarely happens at a scale large enough to make the initial effort worthwhile and b) if you are making such drastic change to your code, moving from elementary getter/setter pairs to more involved computations, it is very likely that you want your unit test to break. What is the moral of this story for unit tests? Should we abandon them altogether? No, but we maintain that it requires some thought about what exactly you want to unit-test. 100% unit test coverage for us means we are wasting effort. Let us take another point. TDD as a concept is not bad, in the sense that it forces you to think about what you actually need to build and how you can get it accepted (tested). We believe, however, that its fundamental approach puts too much “power” in the hands of the developer. It gives the strong impression that the developer (under time pressure) is tempted to build “some- thing” that passes the test, and that is all. So if the test is wrong, the developerisnottoblame!Webelievethatthisundervaluesthestrength of a good developer and gives anyone with a code editor the chance to position himself as a developer. This cannot be right. Looking for software testability, we found another issue that we could not accept. It is the burden that the approach of producing “testable software”putsonyourarchitecture.Tomakeasystem“testable”isone thing,buttoenforcerock-hardprinciplesonthearchitecture(Inversion of Control, Dependency Injection, or a very strict separation of layers)
  • 3. Testing Experience – 27/2014 43 in our opinion only dramatically increases the complexity of the code and, very importantly, it serves no purpose for the end objective of the system, namely to solve a business problem. For highly complex systems,suchapproachesareprobablydefendableandevenverygood. However, in the fast-paced, ever-changing world we live in, the least of our problems is whether a software architecture can be sustained for tenyears,ifwealreadyknowthatintwoyears’timetheentirebusiness system will be obsolete. We may even argue that in two years’ time the insights on what a good architecture should be will have dramatically changed. So why bother with this? We should concentrate on software that works, and preferably that ships in record time. So we concluded that any testing methodology that requires exten- sive re-engineering of what is basically a workable and dependable architecture should be looked upon with a certain suspicion. As a consequence, we do not use unit tests that require our code to be able to work without a database. We do not use “mocking” with all its complexities and we do not spend time on making our classes and objects independent of each other. It does not make for the most “cor- rect” code, we know. However, we do not mind. If tomorrow we find a better way to do it, we will change our code templates and simply re-generate our application code (well, most of it). So we are not overly worried about having the right architecture to begin with – in fact we have already changed it twice, but that is another blog. Sodoesthismeantheendof test-drivendevelopment?Notatall.There are things you can test very well with unit tests. Plus, there is a new de- scendant that we have also investigated, and which shows promise for otherareaswewouldwanttotest:behavior-drivendevelopment(BDD). BDD has the same initial outset as TDD, in the sense that it starts the developmentprocesswiththedefinitionoftheteststhefutureapplica- tion will need to pass to be accepted. But BDD is more appropriate for thistaskbecauseitseemstofocusmoreonthefunctionalityofasystem than on how it should be built. So it is less prone to the criticism we have about TDD. For one thing, it provides for a way to bridge the gap between users and developers by using a specific language in which to specify tests (or acceptance criteria, if you wish). This language, Gherkin (github.com/cucumber/cucumber/wiki/Gherkin), is so simple that the learning curve is as flat is it comes, meaning that everyone can be taught to understand it in record time. Writing proper Gherkin requires a bit more time. For us, its main advantage is that Gherkin provides for a way to com- municatethefunctionalityofasystematalevelthatisunderstandable to a developer. Its main downside is that you will end up with A LOT of Gherkin to fully describe a system of a reasonable size. In the end, this is the main criticism we have about most of these “methodologies”,(UMLincluded).Ifyouhaveasystemthatgoesbeyond asimplecalculator(theusualexample),nomodelinglanguage(asthey all are, in a way) is powerful enough to describe a full and complete system in such a way that you can understand and describe it more quickly than by looking at the screens and the code that implements these screens. So the search goes on … ◼ Read Part II of this article in the December issue (No. 28)! Referenced books ▪ ▪ “The Cucumber Book” (Wynne and Hellesoy) ▪ ▪ “Application testing with Capybara” (Robbins) ▪ ▪ “Beautiful testing” (Robbins and Riley) ▪ ▪ “Experiences of Test Automation (Graham and Fewster) ▪ ▪ “How Google tests software” (Whittaker, Arbon et al.) ▪ ▪ “Selenium Testing Tools Cookbook” (Gundecha) Referenced articles ▪ ▪ “Model Driven Software engineering” (Brambilla et al.) ▪ ▪ “Continuous Delivery” (Humble and Farley) ▪ ▪ “Domain Specific Languages” (Fowler) ▪ ▪ “Domain Specific Modeling” (Kelly et al) ▪ ▪ “Language Implementation Patterns” (Parr) Rudolf de Schipper has extensive experience in project management, consulting, QA, and soft- waredevelopment.Hehasexperienceinmanag- ing large multinational projects and likes work- ing in a team. Rudolf has a strong analytical attitude, with interest in domains such as the public sector, finance and e-business. He has used object-oriented techniques for design and develop- ment in an international context. Apart from the management aspects of IT-related projects, his interests span program manage- ment, quality management, and business consulting, as well as architecture and development. Keeping abreast with technical work, Rudolf has worked with the StratEx team, developing the StratEx application (www.stratexapp.com),its architecture,and the code generation tool that is used. In the process, he has learned and experienced many of the difficulties related to serious soft- ware design and development, including the challenges of testing. LinkedIn: be.linkedin.com/pub/rudolf-de-schipper/3/6a9/6a9 Abdelkrim Boujraf owns companies developing softwarelikeStratEx(programandproject man- agement) and SIMOGGA (lean operations man- agement). He has more than 15 years of experi- ence in different IT positions, from software engineering to program management in man- agement consulting and software manufactur- ing firms. His fields of expertise are operational excellence and col- laborative consumption. Abdelkrim holds an MBA as well as a master’s in IT & Human Sciences. He is a scientific advisor for the Université Libre de Bruxelles where he is expected to provide occa- sional assistance in teaching or scientific research for spin-offs. LinkedIn: be.linkedin.com/in/abdelkrimboujraf > about the authors