SlideShare uma empresa Scribd logo
1 de 44
Staying close to experts 
with executable specifications 
Vagif Abilov, Peder Søholt
Staying close to experts 
with executable specifications 
Vagif Abilov, Peder Søholt
Case study: NRK player 
Norwegian Broadcasting Corporation (NRK) 
• On-demand TV/Radio media player 
• Access to the whole program archive 
• Copyright restrictions 
• Rich metadata information
NRK player
NRK player
Distributed domain knowledge 
• End-user experience 
• Program player 
• Metadata database 
• Media file distribution 
• TV and radio programs are handled by different 
subsystems 
• Program index management 
• Subtitle management
System complexity
Knowledge gathering challenges 
• Experts are engaged in multiple projects 
• Developers are divided into multiple groups and placed 
in different locations 
• Unified terminology is defined but not fully adopted 
• External systems bring their own terms and standards 
• Specifications are frequently revised 
• Interactive sessions with experts may reveal additional 
design constraints
Program metadata 
• Series -> Seasons -> Programs -> Indexes 
• Metadata aggregate may contain 
– Titles 
– Descriptions 
– Subjects 
– Locations 
– Contributors 
• Original program metadata are usually not sufficient for 
on-demand access, therefore part of the project scope 
is extending metadata
Obtaining metadata 
• Metadata come from 4 different data sources 
(programs/transmissions, indexes, subtitles, radio) 
• Metadata sources belong to different subsystems 
managed by different experts 
• Protocols include SOAP and REST, both push and pull 
methods 
• Data transformation rules are established through a 
series of interviews with experts and are revised with 
each iteration
Metadata validation workflow 
Metadata 
bank 
Program 
transmissions 
TV program 
metadata and 
indexes 
Radio program 
metadata and 
indexes 
Subtitles 
Given 
When When 
Then
BDD framework selection 
• Main development is on .NET platform 
• Early consideration: from Fitness to StoryTeller 
• Gherkin appeared to be a good communication 
language choice 
• Collected scenarios became a foundation for 
executable specifications and acceptance tests 
• Considered: Cuke4Nuke 
• Selected: SpecFlow
Example of the specification 
Scenario: Update rights for a TV program 
Given ODA database contains raw rights for program "NNFA20400099" 
| VodPatternId | PublishStart | PublishEnd | 
| 83223739100 | 2012-11-01 | 2012-12-01 | 
And ODA database does not contain raw rights with pattern "832237391" 
When MgxGranitt adapter service receives pattern with data 
| ChangeType | AlternateId | Id | StartDateTime| EndDateTime | 
| NewOrUpdate | NNFA20400099 | 832237391 | 2012-11-11 | 2012-12-11 | 
Then MgxGranitt adapter service should return OK 
And ODA database should contain rights for program "NNFA20400099" 
| PublishStart | PublishEnd | 
| 2012-11-01 | 2012-12-11 |
Feature completion reports
Extending SpecFlow 
Validating data projections and anonymous types
Using LINQ projections in steps
SpecFlow.Assist extension methods
Support for LINQ operations 
• We may need to specify match type: 
• Equivalence (same items in both collections, order is 
insignificant); 
• Equality (same items in the same order); 
• Subset (one collection is a subset of another collection); 
• Intersection (collections have common items).
Lessons and discoveries 
• Initial temptation to focus on end-to-end testing 
• “Don’t use executable specifications as end-to-end 
validations“ (Gojko Adzic) 
• “Acceptance tests written for pure testing sake are 
normally a sign that the code is badly designed” (Matt 
Wynne) 
• Even though Gherkin adds extra 
development/maintenance cost, some developers 
found convenient to use it as specification/document 
tool among technical people
NRK player – architecture layout
User stories and criterias 
• Product owner works together with interaction designer 
and us developers to write User Stories with 
acceptance criterias 
– team work during sprint 
– Criterias in Given, When, Then format 
• People with strong opinions 
• Report showing all specifications. 
• Report showing current sprint specifications
Gherkin and SpecFlow 
• Write tests using SpecFlow 
• Divided in two ways of writing specs 
• Acceptance criteria tests from customer 
• Specifications of how and where we have solved the criteria, this might 
be technical specs
SpecFlow and SpecRun 
• Running tests using SpecRun 
• Can run parallel tests 
• Creating reports using SpecRun 
• Unfortunately no SpecLog usage yet
SpecRun report
SpecRun report
SpecRun report 
• fdsa
SpecRun report 
• fdsa
SpecFlow tips 
• Use tags 
• @acceptance 
• @deleporter 
• @webdriver 
• @sprint35
SpecFlow tips
Web testing - RazorGenerator 
• Generates the views in the MVC model 
• Test the actual HTML output 
• Fast
Web testing - Selenium 
• Web testing with Selenium / Webdriver 
• if you need to test specific stuff on the web 
• Test javascript/AJAX functionality in the 
• Slow, but tests actual functionality in the webbrowser
Web testing - Selenium 
• Use SauceLabs 
• Selenium/Webdriver testing in the cloud 
• Can run parallel tests 
• Lots of browsers and OS to choose between 
• Can test closed in house servers using SSH tunneling
Web testing tips 
• Use abstraction layer, easier maintenance 
• Ex. page-objects. 
• Do not test specifically a tag with hardcore xpath or css 
• Ex.Test that HTML-body has the text you are looking for 
• Do not use for example xpath: 
• /html/body/div/div[2]/div/div/section/article/hgroup/h1 
• Do not use for example CSS-selector: 
• html.gecko body#program.a-showprogramsync div#sfWrap 
div#sfMain div#main div.box section#programMetaData.container 
article#episode.span-10 hgroup h1
Deleporter 
• Cross-Process Code Injection for ASP.NET 
• For mocking data, when running webtests on a different 
machine than where you run your tests 
• Developed by Steven Sanderson
Deleporter
Deleporter
Deleporter
Deleporter
Deleporter 
• For mocking data, when running webtests on different 
machine than where you run your tests 
• SECURITY RISK - DO NOT DEPLOY TO 
PRODUCTION!
Cucumber tests
Cucumber tests
Conclusions 
• Work together with your customer to create good specs 
• Please include a Interaction designer and a developer 
• Use tags in SpecFlow 
• Generate HTML from views instead of web tests – 
much faster 
• When using web tests, use Deleporter for mocking the 
server
Conclusions 
• Executable specifications have proven their efficiency 
when gathering and maintaining expert knowledge 
• Wide adoption requires enthusiasts and patience 
• Use of open source software enables adjusting it for 
team’s specific needs 
• Even within the same organization practice and 
interpretation of terms may differ significantly
Thank you! 
• Vagif Abilov 
• vagif@miles.no 
• @ooobjects 
• http://bloggingabout.net/blogs/vagif/ 
• Peder Søholt 
• peder@miles.no 
• @psoholt 
• http://highfivedrivendevelopment.org

Mais conteúdo relacionado

Mais procurados

Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultDataWorks Summit
 
Debugging seL4 apps with the GNU Debugger
Debugging seL4 apps with the GNU DebuggerDebugging seL4 apps with the GNU Debugger
Debugging seL4 apps with the GNU DebuggerMatthew Russell
 
Whirlpools in the Stream with Jayesh Lalwani
 Whirlpools in the Stream with Jayesh Lalwani Whirlpools in the Stream with Jayesh Lalwani
Whirlpools in the Stream with Jayesh LalwaniDatabricks
 
What’s new in Apache Spark 2.3 and Spark 2.4
What’s new in Apache Spark 2.3 and Spark 2.4What’s new in Apache Spark 2.3 and Spark 2.4
What’s new in Apache Spark 2.3 and Spark 2.4DataWorks Summit
 
Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...DataWorks Summit
 
Hdf5 current future
Hdf5 current futureHdf5 current future
Hdf5 current futuremfolk
 
Data ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFiData ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFiLev Brailovskiy
 
Supporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce HelixSupporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce HelixPerforce
 
Running Apache NiFi with Apache Spark : Integration Options
Running Apache NiFi with Apache Spark : Integration OptionsRunning Apache NiFi with Apache Spark : Integration Options
Running Apache NiFi with Apache Spark : Integration OptionsTimothy Spann
 
SAM—streaming analytics made easy
SAM—streaming analytics made easySAM—streaming analytics made easy
SAM—streaming analytics made easyDataWorks Summit
 
A Collaborative Data Science Development Workflow
A Collaborative Data Science Development WorkflowA Collaborative Data Science Development Workflow
A Collaborative Data Science Development WorkflowDatabricks
 
Database ingest with Apache NiFi and MiNiFi
Database ingest with Apache NiFi and MiNiFiDatabase ingest with Apache NiFi and MiNiFi
Database ingest with Apache NiFi and MiNiFiLucian Neghina
 
Empowering Zillow’s Developers with Self-Service ETL
Empowering Zillow’s Developers with Self-Service ETLEmpowering Zillow’s Developers with Self-Service ETL
Empowering Zillow’s Developers with Self-Service ETLDatabricks
 
From ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
From ClearCase to Perforce Helix: Breakthroughs in Scalability at IntelFrom ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
From ClearCase to Perforce Helix: Breakthroughs in Scalability at IntelPerforce
 
Apache NiFi Meetup - Introduction to NiFi Registry
Apache NiFi Meetup - Introduction to NiFi RegistryApache NiFi Meetup - Introduction to NiFi Registry
Apache NiFi Meetup - Introduction to NiFi RegistryBryan Bende
 
Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)
Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)
Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)Frank Scheffler
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBJohn Bennett
 
Integrating NiFi and Flink
Integrating NiFi and FlinkIntegrating NiFi and Flink
Integrating NiFi and FlinkBryan Bende
 
An elastic batch-and stream-processing stack with Pravega and Apache Flink
An elastic batch-and stream-processing stack with Pravega and Apache FlinkAn elastic batch-and stream-processing stack with Pravega and Apache Flink
An elastic batch-and stream-processing stack with Pravega and Apache FlinkDataWorks Summit
 
How to Reduce Database Load with Sparse Branches
How to Reduce Database Load with Sparse BranchesHow to Reduce Database Load with Sparse Branches
How to Reduce Database Load with Sparse BranchesPerforce
 

Mais procurados (20)

Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at Renault
 
Debugging seL4 apps with the GNU Debugger
Debugging seL4 apps with the GNU DebuggerDebugging seL4 apps with the GNU Debugger
Debugging seL4 apps with the GNU Debugger
 
Whirlpools in the Stream with Jayesh Lalwani
 Whirlpools in the Stream with Jayesh Lalwani Whirlpools in the Stream with Jayesh Lalwani
Whirlpools in the Stream with Jayesh Lalwani
 
What’s new in Apache Spark 2.3 and Spark 2.4
What’s new in Apache Spark 2.3 and Spark 2.4What’s new in Apache Spark 2.3 and Spark 2.4
What’s new in Apache Spark 2.3 and Spark 2.4
 
Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...Present and future of unified, portable and efficient data processing with Ap...
Present and future of unified, portable and efficient data processing with Ap...
 
Hdf5 current future
Hdf5 current futureHdf5 current future
Hdf5 current future
 
Data ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFiData ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFi
 
Supporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce HelixSupporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce Helix
 
Running Apache NiFi with Apache Spark : Integration Options
Running Apache NiFi with Apache Spark : Integration OptionsRunning Apache NiFi with Apache Spark : Integration Options
Running Apache NiFi with Apache Spark : Integration Options
 
SAM—streaming analytics made easy
SAM—streaming analytics made easySAM—streaming analytics made easy
SAM—streaming analytics made easy
 
A Collaborative Data Science Development Workflow
A Collaborative Data Science Development WorkflowA Collaborative Data Science Development Workflow
A Collaborative Data Science Development Workflow
 
Database ingest with Apache NiFi and MiNiFi
Database ingest with Apache NiFi and MiNiFiDatabase ingest with Apache NiFi and MiNiFi
Database ingest with Apache NiFi and MiNiFi
 
Empowering Zillow’s Developers with Self-Service ETL
Empowering Zillow’s Developers with Self-Service ETLEmpowering Zillow’s Developers with Self-Service ETL
Empowering Zillow’s Developers with Self-Service ETL
 
From ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
From ClearCase to Perforce Helix: Breakthroughs in Scalability at IntelFrom ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
From ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
 
Apache NiFi Meetup - Introduction to NiFi Registry
Apache NiFi Meetup - Introduction to NiFi RegistryApache NiFi Meetup - Introduction to NiFi Registry
Apache NiFi Meetup - Introduction to NiFi Registry
 
Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)
Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)
Sprache als Werkzeug: DSLs mit Kotlin (JAX 2020)
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDB
 
Integrating NiFi and Flink
Integrating NiFi and FlinkIntegrating NiFi and Flink
Integrating NiFi and Flink
 
An elastic batch-and stream-processing stack with Pravega and Apache Flink
An elastic batch-and stream-processing stack with Pravega and Apache FlinkAn elastic batch-and stream-processing stack with Pravega and Apache Flink
An elastic batch-and stream-processing stack with Pravega and Apache Flink
 
How to Reduce Database Load with Sparse Branches
How to Reduce Database Load with Sparse BranchesHow to Reduce Database Load with Sparse Branches
How to Reduce Database Load with Sparse Branches
 

Semelhante a Staying Close to Experts with Executable Specifications

Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
OUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryOUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryBrendan Tierney
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at ScaleOracle Developers
 
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...Spark Summit
 
Netflix Architecture and Open Source
Netflix Architecture and Open SourceNetflix Architecture and Open Source
Netflix Architecture and Open SourceAll Things Open
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
Pa Project And Best Practice 2
Pa Project And Best Practice 2Pa Project And Best Practice 2
Pa Project And Best Practice 2alice yang
 
Out With the Old, in With the Open-source: Brainshark's Complete CMS Migration
Out With the Old, in With the Open-source: Brainshark's Complete CMS MigrationOut With the Old, in With the Open-source: Brainshark's Complete CMS Migration
Out With the Old, in With the Open-source: Brainshark's Complete CMS MigrationAcquia
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Derek Ashmore
 
Ananth_Ravishankar
Ananth_RavishankarAnanth_Ravishankar
Ananth_Ravishankarananth R
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAdam Getchell
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework DesignsTest Automaton
 
How a Data Mesh is Driving our Platform | Trey Hicks, Gloo
How a Data Mesh is Driving our Platform | Trey Hicks, GlooHow a Data Mesh is Driving our Platform | Trey Hicks, Gloo
How a Data Mesh is Driving our Platform | Trey Hicks, GlooHostedbyConfluent
 
FlexDeploy Product Technical Overview
FlexDeploy Product Technical OverviewFlexDeploy Product Technical Overview
FlexDeploy Product Technical OverviewDalibor Blazevic
 
The Future of BriteCore - Product Development
The Future of BriteCore - Product DevelopmentThe Future of BriteCore - Product Development
The Future of BriteCore - Product DevelopmentPhil Reynolds
 

Semelhante a Staying Close to Experts with Executable Specifications (20)

Security for devs
Security for devsSecurity for devs
Security for devs
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
OUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryOUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th January
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
 
Netflix Architecture and Open Source
Netflix Architecture and Open SourceNetflix Architecture and Open Source
Netflix Architecture and Open Source
 
tip oopt pse-summit2017
tip oopt pse-summit2017tip oopt pse-summit2017
tip oopt pse-summit2017
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Pa Project And Best Practice 2
Pa Project And Best Practice 2Pa Project And Best Practice 2
Pa Project And Best Practice 2
 
Out With the Old, in With the Open-source: Brainshark's Complete CMS Migration
Out With the Old, in With the Open-source: Brainshark's Complete CMS MigrationOut With the Old, in With the Open-source: Brainshark's Complete CMS Migration
Out With the Old, in With the Open-source: Brainshark's Complete CMS Migration
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
 
Ananth_Ravishankar
Ananth_RavishankarAnanth_Ravishankar
Ananth_Ravishankar
 
Resume
ResumeResume
Resume
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development Management
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
How a Data Mesh is Driving our Platform | Trey Hicks, Gloo
How a Data Mesh is Driving our Platform | Trey Hicks, GlooHow a Data Mesh is Driving our Platform | Trey Hicks, Gloo
How a Data Mesh is Driving our Platform | Trey Hicks, Gloo
 
FlexDeploy Product Technical Overview
FlexDeploy Product Technical OverviewFlexDeploy Product Technical Overview
FlexDeploy Product Technical Overview
 
Resume
ResumeResume
Resume
 
The Future of BriteCore - Product Development
The Future of BriteCore - Product DevelopmentThe Future of BriteCore - Product Development
The Future of BriteCore - Product Development
 
Resume_ETL__Testing
Resume_ETL__TestingResume_ETL__Testing
Resume_ETL__Testing
 

Mais de Vagif Abilov

А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?Vagif Abilov
 
Cross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class LibrariesCross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class LibrariesVagif Abilov
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesVagif Abilov
 
Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#Vagif Abilov
 
Путь к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификацийПуть к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификацийVagif Abilov
 
F# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of LifeF# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of LifeVagif Abilov
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in ActionVagif Abilov
 

Mais de Vagif Abilov (8)

А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?
 
Cross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class LibrariesCross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class Libraries
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#
 
Путь к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификацийПуть к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификаций
 
Practical OData
Practical ODataPractical OData
Practical OData
 
F# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of LifeF# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of Life
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in Action
 

Último

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 

Último (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

Staying Close to Experts with Executable Specifications

  • 1. Staying close to experts with executable specifications Vagif Abilov, Peder Søholt
  • 2. Staying close to experts with executable specifications Vagif Abilov, Peder Søholt
  • 3. Case study: NRK player Norwegian Broadcasting Corporation (NRK) • On-demand TV/Radio media player • Access to the whole program archive • Copyright restrictions • Rich metadata information
  • 6. Distributed domain knowledge • End-user experience • Program player • Metadata database • Media file distribution • TV and radio programs are handled by different subsystems • Program index management • Subtitle management
  • 8. Knowledge gathering challenges • Experts are engaged in multiple projects • Developers are divided into multiple groups and placed in different locations • Unified terminology is defined but not fully adopted • External systems bring their own terms and standards • Specifications are frequently revised • Interactive sessions with experts may reveal additional design constraints
  • 9. Program metadata • Series -> Seasons -> Programs -> Indexes • Metadata aggregate may contain – Titles – Descriptions – Subjects – Locations – Contributors • Original program metadata are usually not sufficient for on-demand access, therefore part of the project scope is extending metadata
  • 10. Obtaining metadata • Metadata come from 4 different data sources (programs/transmissions, indexes, subtitles, radio) • Metadata sources belong to different subsystems managed by different experts • Protocols include SOAP and REST, both push and pull methods • Data transformation rules are established through a series of interviews with experts and are revised with each iteration
  • 11. Metadata validation workflow Metadata bank Program transmissions TV program metadata and indexes Radio program metadata and indexes Subtitles Given When When Then
  • 12. BDD framework selection • Main development is on .NET platform • Early consideration: from Fitness to StoryTeller • Gherkin appeared to be a good communication language choice • Collected scenarios became a foundation for executable specifications and acceptance tests • Considered: Cuke4Nuke • Selected: SpecFlow
  • 13. Example of the specification Scenario: Update rights for a TV program Given ODA database contains raw rights for program "NNFA20400099" | VodPatternId | PublishStart | PublishEnd | | 83223739100 | 2012-11-01 | 2012-12-01 | And ODA database does not contain raw rights with pattern "832237391" When MgxGranitt adapter service receives pattern with data | ChangeType | AlternateId | Id | StartDateTime| EndDateTime | | NewOrUpdate | NNFA20400099 | 832237391 | 2012-11-11 | 2012-12-11 | Then MgxGranitt adapter service should return OK And ODA database should contain rights for program "NNFA20400099" | PublishStart | PublishEnd | | 2012-11-01 | 2012-12-11 |
  • 15. Extending SpecFlow Validating data projections and anonymous types
  • 18. Support for LINQ operations • We may need to specify match type: • Equivalence (same items in both collections, order is insignificant); • Equality (same items in the same order); • Subset (one collection is a subset of another collection); • Intersection (collections have common items).
  • 19. Lessons and discoveries • Initial temptation to focus on end-to-end testing • “Don’t use executable specifications as end-to-end validations“ (Gojko Adzic) • “Acceptance tests written for pure testing sake are normally a sign that the code is badly designed” (Matt Wynne) • Even though Gherkin adds extra development/maintenance cost, some developers found convenient to use it as specification/document tool among technical people
  • 20. NRK player – architecture layout
  • 21. User stories and criterias • Product owner works together with interaction designer and us developers to write User Stories with acceptance criterias – team work during sprint – Criterias in Given, When, Then format • People with strong opinions • Report showing all specifications. • Report showing current sprint specifications
  • 22. Gherkin and SpecFlow • Write tests using SpecFlow • Divided in two ways of writing specs • Acceptance criteria tests from customer • Specifications of how and where we have solved the criteria, this might be technical specs
  • 23. SpecFlow and SpecRun • Running tests using SpecRun • Can run parallel tests • Creating reports using SpecRun • Unfortunately no SpecLog usage yet
  • 28. SpecFlow tips • Use tags • @acceptance • @deleporter • @webdriver • @sprint35
  • 30. Web testing - RazorGenerator • Generates the views in the MVC model • Test the actual HTML output • Fast
  • 31. Web testing - Selenium • Web testing with Selenium / Webdriver • if you need to test specific stuff on the web • Test javascript/AJAX functionality in the • Slow, but tests actual functionality in the webbrowser
  • 32. Web testing - Selenium • Use SauceLabs • Selenium/Webdriver testing in the cloud • Can run parallel tests • Lots of browsers and OS to choose between • Can test closed in house servers using SSH tunneling
  • 33. Web testing tips • Use abstraction layer, easier maintenance • Ex. page-objects. • Do not test specifically a tag with hardcore xpath or css • Ex.Test that HTML-body has the text you are looking for • Do not use for example xpath: • /html/body/div/div[2]/div/div/section/article/hgroup/h1 • Do not use for example CSS-selector: • html.gecko body#program.a-showprogramsync div#sfWrap div#sfMain div#main div.box section#programMetaData.container article#episode.span-10 hgroup h1
  • 34. Deleporter • Cross-Process Code Injection for ASP.NET • For mocking data, when running webtests on a different machine than where you run your tests • Developed by Steven Sanderson
  • 39. Deleporter • For mocking data, when running webtests on different machine than where you run your tests • SECURITY RISK - DO NOT DEPLOY TO PRODUCTION!
  • 42. Conclusions • Work together with your customer to create good specs • Please include a Interaction designer and a developer • Use tags in SpecFlow • Generate HTML from views instead of web tests – much faster • When using web tests, use Deleporter for mocking the server
  • 43. Conclusions • Executable specifications have proven their efficiency when gathering and maintaining expert knowledge • Wide adoption requires enthusiasts and patience • Use of open source software enables adjusting it for team’s specific needs • Even within the same organization practice and interpretation of terms may differ significantly
  • 44. Thank you! • Vagif Abilov • vagif@miles.no • @ooobjects • http://bloggingabout.net/blogs/vagif/ • Peder Søholt • peder@miles.no • @psoholt • http://highfivedrivendevelopment.org