SlideShare a Scribd company logo
1 of 40
Download to read offline
Gallio: Crafting a Toolchain



             Jeff Brown
             jeff.brown@gmail.com
About Me

 Jeff Brown
 Lead Software Engineer at Yellowpages.com



 Creator of Gallio Open Source Project
 Lead of MbUnit Open Source Project
 Coding is fun!
Outline

 Gallio and MbUnit
 Demo
 What is a Toolchain?
 Implementation Challenges
 Under the Hood
 Roadmap
 Questions
Gallio

 Gallio is a neutral test automation platform.
      Open Source. (Apache License)
  –
      Microsoft .Net platform.
  –
      Aims to provide great tools integration for many
  –
      different test frameworks.
      Started in October 2007 as a spinoff from MbUnit.
  –

 Current release: v3.0.5.
 Website: www.gallio.org
Gallio

 Vision: Gallio will be the foundation for a rich
 suite of interoperable tools.
      Test frameworks.
      Test runners.
      Test case managers.
      Test generators.
      Test reports and analytics.
      Test editors and IDE integration.
      Continuous integration facilities.
Gallio

 Lingua franca for test tools.
      Common object model.
  –
      Support for many different workflows.
  –
      Extensible.
  –
      Evolving.
  –
      Owned by the community.
  –



 Objective: To unite, not to control.
Gallio

 Tools support
      Frameworks: CSUnit, MbUnit v2, MbUnit v3, MSTest,
  –
      NBehave, NUnit, xUnit.net
      Runners: GUI (Icarus), Command-line (Echo),
  –
      TestDriven.Net, ReSharper, Visual Studio Test Tools,
      MSBuild, NAnt, PowerShell.
      Other: CruiseControl.Net, TeamCity, TypeMock, NCover,
  –
      Pex, AutoCAD
 3rd party Contributions: DXCore runner (RedGreen),
 MSpec, and more…
Gallio

 Trivia
      Original code name provided by Andrew Stopford
  –
      was to be “Galileo” but it was corrupted to “Gallio”
      due to a misspelling in an early email thread.
MbUnit

 MbUnit is a test automation framework.
     Open Source. (Apache License)
 –
     Aims to provide a powerful framework for unit
 –
     testing and integration testing for .Net.
     Started by Jonathan “Peli” de Halleux in 2004.
 –
     Complete rewrite for MbUnit v3 in 2007/2008.
 –

 Current release: MbUnit v3.0.5.
 Website: www.mbunit.com
MbUnit

 MbUnit is mostly NUnit compatible but
 improves on it in many ways:
     Focus on usability and clear reporting.
 –
     Data-driven testing. (eg. [Row]-test, pairwise and
 –
     combinatorial testing)
     Supports unit testing and integration testing.
 –
     Easily extensible by creating new attributes.
 –
     Dynamic test structure.
 –
MbUnit

 Trivia:
     Original name was GUnit but that name turned
 –
     out to already be taken.
     Model based Unit Testing Framework.
 –


     Or if you prefer…
 –
       Much better Unit Testing Framework. ;-)
Gallio and MbUnit Demo
What is a Toolchain?

 A collection of tools that work together.

 Did you notice how many different
 interactions there were between tools in the
 demo?
      A lot.
  –
Implementation Challenges

 Test code is hostile!
     By definition, subject under test may contain
 –
     bugs.
     Could kill the test process due to stack overflows,
 –
     out of memory, and other side-effects.
 Test code must be isolated.
     Run in separate process, ideally.
 –
     Run in separate AppDomain, at a minimum.
 –
     Be prepared to abort the test run.
 –
Implementation Challenges

 Test frameworks define tests differently.
     xUnit.Net: A fixture is just a .Net class, a test is
 –
     just a .Net method.
     NUnit: Tests are declared statically using
 –
     metadata in a .Net assembly.
     MbUnit: Tests are declared statically but data-
 –
     driven test instances are generated dynamically.
     RSpec: Tests are generated dynamically when a
 –
     test script is evaluated.
Implementation Challenges

 Test frameworks define tests differently…
     Some use XML.
 –
     Some use databases.
 –
     Some use collections of standalone programs.
 –
     Some generate tests on-the-fly from a model.
 –
     etc...
 –

 Test representation must be flexible.
 Test platform must not be “opinionated” though it
 must support frameworks that are.
Implementation Challenges

 Test frameworks make assumptions
     Working directory contains test assembly.
 –
     Application base directory is same as working directory.
 –
     Can resolve references to test assembly dependencies.
 –
     If a test assembly has an associated configuration file, it is
 –
     loaded.
     x86-only tests run in x86 mode on x64.
 –
     Full trust security model.
 –
Implementation Challenges

 Extensibility model mismatches.
     ReSharper wants plugins to be installed in
 –
     C:Program FilesJetBrainsReSharper...
     Visual Studio Test Tools must be able to load
 –
     custom test types from GAC or from Visual Studio
     Private Assemblies.
     TestDriven.Net can load a test framework
 –
     assembly from anywhere but it might not be able
     to resolve the references of that assembly.
Implementation Challenges

 Test platform must be prepared to establish
 its own private hosting environment
 regardless of how it is loaded by 3rd party
 tools.
Implementation Challenges

 Test hosts make assumptions
     Everything is running in a single process (for
 –
     debuggers and code profilers).
     Test code does not have lasting side effects upon
 –
     the host.
     Test structure:
 –
       Dynamic metadata rich hierarchy (Gallio)
       Static hierarchy rooted at project (ReSharper)
       Static flat list (Visual Studio)
       Ignored and not reported in results (TestDriven.net)
Under the Hood
Under the Hood: Test Model

 At test exploration time...
     All we have is static metadata.
 –
     Some data may not be available.
 –
     Might not be able to execute code.
 –
     Create a ITest Tree to describe exploration.
 –

 At test execution time…
     We have all the information.
 –
     Create a ITestStep Tree to describe execution.
 –
Under the Hood: Test Model

 Tests have:
     Unique stable identifier.
 –
     Name.
 –
     Metadata.
 –
        Kind: Namespace, Fixture, Suite, Test, etc…
        Description.
        Documentation.
        Arbitrary key/value pairs.
     Children.
 –
     Dependencies.
 –
     Ordering.
 –
     Parameters.
 –
Under the Hood: Test Model

 Caveats:
     We might define new tests at runtime.
 –
     Tests might have dynamic substructure
 –
       eg. Instances of parameterized tests.
     Test runners cannot assume static and dynamic
 –
     test structure are the same (but many do..)
Under the Hood: Test Log

 Want to report test results uniformly.
 Simple document format.
 Primitives:
     Streams (Containers)
 –
        Failures, Warnings, Console Output, etc...
     Sections (Delimiters)
 –
     Markers (Embedded Metadata)
 –
        Diffs, Links, Highlights, Stack Traces
     Text
 –
     Attachments
 –
Under the Hood: Reflection

 Tests can be explored before compilation!
      JetBrains ReSharper™ unit test runner
  –

 Abstract reflection layer
      Native .Net reflection wrappers.
  –
      ReSharper Code Model wrappers. (x2)
  –
      Visual Studio Code Model wrappers.
  –
      Cecil wrappers.
  –
 Enables test explorer to be polymorphic.
Under the Hood: Reflection

 Abstract Reflection API
      IReflectionPolicy
  –
      ICodeElementInfo
  –
         IAssemblyInfo, IAttributeInfo, IConstructorInfo, IEventInfo,
         IFieldInfo, IGenericParameterInfo, IMemberInfo,
         IMethodInfo, INamespaceInfo, IParameterInfo, ITypeInfo
      CodeLocation, CodeReference
  –
      Access to Xml documentation comments.
  –

 Unexpected bonus: Uniformity
      IFunctionInfo: constructor or method.
  –
      ISlotInfo: field, property, parameter, or generic parameter.
  –
Under the Hood:
Pattern Test Framework

 Reflection-based frameworks are common.
 Demand for different syntaxes: BDD, etc…
 Typical solution:
      Syntax adapters: wrap another test framework.
  –

 Better solution:
      Reuse code test exploration strategy.
  –
      Define completely custom syntax.
  –
      Better user experience and branding potential.
  –
Under the Hood:
Pattern Test Framework

 IPattern
      Basic compositional unit of structure in a test.
  –
         “Abstract syntax”
      Three basic methods:
  –
         IsPrimary: Does this pattern declare something new?
         Consume: If this pattern is primary, produce something
         new from a given code element.
         Process: Enrich something else created by another
         pattern using a given code element.
Under the Hood:
Pattern Test Framework

 [PatternAttribute]
      Associates a pattern with a code element.
  –
      Most MbUnit v3 attributes are Pattern Attributes.
  –
         You can make a custom framework the same way.
Under the Hood:
Pattern Test Framework

 MbUnit v3 Examples:
      [Test]: Primary pattern that creates a new tests.
  –
      [SetUp]: Primary pattern that registers the
  –
      associated method in the “setup chain” of the
      containing fixture.
      [Description]: Secondary pattern that adds
  –
      descriptive metadata to a test or fixture.
      [Row]: Secondary pattern that adds a new data
  –
      source to a test or fixture.
Under the Hood:
Pattern Test Framework

 Might help you write a new test framework…
      Reflection-based test exploration.
  –
      General-purpose test execution engine.
  –
      Data binding.
  –
      etc...
  –

 Or forget all of this and build it from scratch…
      Just implement ITestFramework, ITestExplorer,
  –
      and ITestController to explore and execute tests.
Lessons Learned

 Beware of hidden assumptions.
     All test hosts are a little different.
 –
     Protect the test frameworks and tools from
 –
     unanticipated variations in hosting.
 Version independence is mandatory.
Lessons Learned

 Consolidation of the tool chain is very useful.
 This is a lot harder than it looks!
     If you plan to write your own test framework,
 –
     consider using Gallio as the underlying platform.
Roadmap

 v3.0: First spike.
     Self-host.
 –
     Integrate with many different environments.
 –
     Challenge assumptions. Gain experience.
 –

 v3.1: Generalize and consolidate.
     Support non-.Net languages and workflows.
 –
     Simplify extensibility contracts.
 –
     Performance.
 –
Gallio Futures

 Gallio is the nucleus of a growing suite of
 interoperable test tools.
      Ambience: A database for persistent test data.
  –
      Archimedes: An automation test case manager
  –
      including distributed test agent and test data
      warehouse.
 Dynamic languages, scripting languages,
 test DSLs and non .Net frameworks in v3.1.
MbUnit Futures

 More built-in assertions.
 Provide “mixins” to assist with integration of
 3rd party libraries such as Rhino.Mocks,
 Selenium and WatiN.
 ASP.Net hosting.
 .Net Framework 4.0 extensions.
Ongoing and Upcoming Projects

 Gallio Book
 Mono Support
 Test Case Manager (Archimedes)
 Test Data Warehouse
 Distributed Test Runner
 Modeling Language for Integration Tests
Volunteers Wanted!

 What do you want to do?
     Build your own stuff using Gallio.
 –
     Add new stuff to Gallio itself.
 –
     Promote Gallio.
 –
     Offer feedback and suggestions.
 –
     Help us write the Gallio Book.
 –
Questions?

More Related Content

What's hot

TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleNoam Kfir
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtestWill Shen
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkArulalan T
 
Embrace Unit Testing
Embrace Unit TestingEmbrace Unit Testing
Embrace Unit Testingalessiopace
 
Unit testing best practices with JUnit
Unit testing best practices with JUnitUnit testing best practices with JUnit
Unit testing best practices with JUnitinTwentyEight Minutes
 
Black Hat EU 2010 - Attacking Java Serialized Communication
Black Hat EU 2010 - Attacking Java Serialized CommunicationBlack Hat EU 2010 - Attacking Java Serialized Communication
Black Hat EU 2010 - Attacking Java Serialized Communicationmsaindane
 
Breaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit TestingBreaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit TestingSteven Smith
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockitoshaunthomas999
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practicesnickokiss
 
Quickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop ApplicationsQuickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop ApplicationsClare Macrae
 
TestNG vs JUnit: cease fire or the end of the war
TestNG vs JUnit: cease fire or the end of the warTestNG vs JUnit: cease fire or the end of the war
TestNG vs JUnit: cease fire or the end of the warOleksiy Rezchykov
 
Programmer testing
Programmer testingProgrammer testing
Programmer testingJoao Pereira
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTestRaihan Masud
 
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google MockICS
 

What's hot (20)

PHP Unit Testing
PHP Unit TestingPHP Unit Testing
PHP Unit Testing
 
Auto testing!
Auto testing!Auto testing!
Auto testing!
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black Hole
 
Testing In Java
Testing In JavaTesting In Java
Testing In Java
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtest
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-framework
 
Introduction to JUnit
Introduction to JUnitIntroduction to JUnit
Introduction to JUnit
 
Mini-Training: NFluent
Mini-Training: NFluentMini-Training: NFluent
Mini-Training: NFluent
 
Embrace Unit Testing
Embrace Unit TestingEmbrace Unit Testing
Embrace Unit Testing
 
JMockit
JMockitJMockit
JMockit
 
Unit testing best practices with JUnit
Unit testing best practices with JUnitUnit testing best practices with JUnit
Unit testing best practices with JUnit
 
Black Hat EU 2010 - Attacking Java Serialized Communication
Black Hat EU 2010 - Attacking Java Serialized CommunicationBlack Hat EU 2010 - Attacking Java Serialized Communication
Black Hat EU 2010 - Attacking Java Serialized Communication
 
Breaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit TestingBreaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit Testing
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practices
 
Quickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop ApplicationsQuickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop Applications
 
TestNG vs JUnit: cease fire or the end of the war
TestNG vs JUnit: cease fire or the end of the warTestNG vs JUnit: cease fire or the end of the war
TestNG vs JUnit: cease fire or the end of the war
 
Programmer testing
Programmer testingProgrammer testing
Programmer testing
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTest
 
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
 

Similar to Gallio Crafting A Toolchain

Testing in Craft CMS
Testing in Craft CMSTesting in Craft CMS
Testing in Craft CMSJustinHolt20
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchMats Bryntse
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologieselliando dias
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Cωνσtantίnoς Giannoulis
 
Integration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubsIntegration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubsRody Middelkoop
 
Getting the most out of rails tests
Getting the most out of rails testsGetting the most out of rails tests
Getting the most out of rails testsJustin Weiss
 
Practical Chaos Engineering
Practical Chaos EngineeringPractical Chaos Engineering
Practical Chaos EngineeringSIGHUP
 
QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answersRita Singh
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Qualityguest268ee8
 
We continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellWe continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellPVS-Studio
 
Katalon Studio - GUI Overview
Katalon Studio - GUI OverviewKatalon Studio - GUI Overview
Katalon Studio - GUI OverviewKatalon Studio
 
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBeginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBaskar K
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraTomislav Plavcic
 
System verilog important
System verilog importantSystem verilog important
System verilog importantelumalai7
 
Coldbox developer training – session 4
Coldbox developer training – session 4Coldbox developer training – session 4
Coldbox developer training – session 4Billie Berzinskas
 

Similar to Gallio Crafting A Toolchain (20)

Testing in Craft CMS
Testing in Craft CMSTesting in Craft CMS
Testing in Craft CMS
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Unit tests and TDD
Unit tests and TDDUnit tests and TDD
Unit tests and TDD
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
 
Testing 101
Testing 101Testing 101
Testing 101
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
 
Integration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubsIntegration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubs
 
Getting the most out of rails tests
Getting the most out of rails testsGetting the most out of rails tests
Getting the most out of rails tests
 
Practical Chaos Engineering
Practical Chaos EngineeringPractical Chaos Engineering
Practical Chaos Engineering
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answers
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Quality
 
We continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellWe continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShell
 
Katalon Studio - GUI Overview
Katalon Studio - GUI OverviewKatalon Studio - GUI Overview
Katalon Studio - GUI Overview
 
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NETBeginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
 
System verilog important
System verilog importantSystem verilog important
System verilog important
 
Unit testing - A&BP CC
Unit testing - A&BP CCUnit testing - A&BP CC
Unit testing - A&BP CC
 
Coldbox developer training – session 4
Coldbox developer training – session 4Coldbox developer training – session 4
Coldbox developer training – session 4
 

More from ConSanFrancisco123

Open Ap Is State Of The Market
Open Ap Is State Of The MarketOpen Ap Is State Of The Market
Open Ap Is State Of The MarketConSanFrancisco123
 
Yahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudYahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudConSanFrancisco123
 
Yellowpagescom Behind The Curtain
Yellowpagescom Behind The CurtainYellowpagescom Behind The Curtain
Yellowpagescom Behind The CurtainConSanFrancisco123
 
Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeConSanFrancisco123
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelConSanFrancisco123
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise DevelopmentConSanFrancisco123
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My SpacecomConSanFrancisco123
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentConSanFrancisco123
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static AnalysisConSanFrancisco123
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The LargeConSanFrancisco123
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemConSanFrancisco123
 
Business Natural Languages Development In Ruby
Business Natural Languages Development In RubyBusiness Natural Languages Development In Ruby
Business Natural Languages Development In RubyConSanFrancisco123
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeConSanFrancisco123
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutConSanFrancisco123
 

More from ConSanFrancisco123 (20)

Open Ap Is State Of The Market
Open Ap Is State Of The MarketOpen Ap Is State Of The Market
Open Ap Is State Of The Market
 
Yahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudYahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The Cloud
 
Ruby V Ms A Comparison
Ruby V Ms A ComparisonRuby V Ms A Comparison
Ruby V Ms A Comparison
 
Yellowpagescom Behind The Curtain
Yellowpagescom Behind The CurtainYellowpagescom Behind The Curtain
Yellowpagescom Behind The Curtain
 
Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any Time
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal Level
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise Development
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My Spacecom
 
Building Blueprint With Gwt
Building Blueprint With GwtBuilding Blueprint With Gwt
Building Blueprint With Gwt
 
Security Cas And Open Id
Security Cas And Open IdSecurity Cas And Open Id
Security Cas And Open Id
 
Soa And Web Services Security
Soa And Web Services SecuritySoa And Web Services Security
Soa And Web Services Security
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software Development
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static Analysis
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The Large
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome Them
 
Business Natural Languages Development In Ruby
Business Natural Languages Development In RubyBusiness Natural Languages Development In Ruby
Business Natural Languages Development In Ruby
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And Change
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered About
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Gallio Crafting A Toolchain

  • 1. Gallio: Crafting a Toolchain Jeff Brown jeff.brown@gmail.com
  • 2. About Me Jeff Brown Lead Software Engineer at Yellowpages.com Creator of Gallio Open Source Project Lead of MbUnit Open Source Project Coding is fun!
  • 3. Outline Gallio and MbUnit Demo What is a Toolchain? Implementation Challenges Under the Hood Roadmap Questions
  • 4. Gallio Gallio is a neutral test automation platform. Open Source. (Apache License) – Microsoft .Net platform. – Aims to provide great tools integration for many – different test frameworks. Started in October 2007 as a spinoff from MbUnit. – Current release: v3.0.5. Website: www.gallio.org
  • 5. Gallio Vision: Gallio will be the foundation for a rich suite of interoperable tools. Test frameworks. Test runners. Test case managers. Test generators. Test reports and analytics. Test editors and IDE integration. Continuous integration facilities.
  • 6. Gallio Lingua franca for test tools. Common object model. – Support for many different workflows. – Extensible. – Evolving. – Owned by the community. – Objective: To unite, not to control.
  • 7. Gallio Tools support Frameworks: CSUnit, MbUnit v2, MbUnit v3, MSTest, – NBehave, NUnit, xUnit.net Runners: GUI (Icarus), Command-line (Echo), – TestDriven.Net, ReSharper, Visual Studio Test Tools, MSBuild, NAnt, PowerShell. Other: CruiseControl.Net, TeamCity, TypeMock, NCover, – Pex, AutoCAD 3rd party Contributions: DXCore runner (RedGreen), MSpec, and more…
  • 8. Gallio Trivia Original code name provided by Andrew Stopford – was to be “Galileo” but it was corrupted to “Gallio” due to a misspelling in an early email thread.
  • 9. MbUnit MbUnit is a test automation framework. Open Source. (Apache License) – Aims to provide a powerful framework for unit – testing and integration testing for .Net. Started by Jonathan “Peli” de Halleux in 2004. – Complete rewrite for MbUnit v3 in 2007/2008. – Current release: MbUnit v3.0.5. Website: www.mbunit.com
  • 10. MbUnit MbUnit is mostly NUnit compatible but improves on it in many ways: Focus on usability and clear reporting. – Data-driven testing. (eg. [Row]-test, pairwise and – combinatorial testing) Supports unit testing and integration testing. – Easily extensible by creating new attributes. – Dynamic test structure. –
  • 11. MbUnit Trivia: Original name was GUnit but that name turned – out to already be taken. Model based Unit Testing Framework. – Or if you prefer… – Much better Unit Testing Framework. ;-)
  • 13. What is a Toolchain? A collection of tools that work together. Did you notice how many different interactions there were between tools in the demo? A lot. –
  • 14. Implementation Challenges Test code is hostile! By definition, subject under test may contain – bugs. Could kill the test process due to stack overflows, – out of memory, and other side-effects. Test code must be isolated. Run in separate process, ideally. – Run in separate AppDomain, at a minimum. – Be prepared to abort the test run. –
  • 15. Implementation Challenges Test frameworks define tests differently. xUnit.Net: A fixture is just a .Net class, a test is – just a .Net method. NUnit: Tests are declared statically using – metadata in a .Net assembly. MbUnit: Tests are declared statically but data- – driven test instances are generated dynamically. RSpec: Tests are generated dynamically when a – test script is evaluated.
  • 16. Implementation Challenges Test frameworks define tests differently… Some use XML. – Some use databases. – Some use collections of standalone programs. – Some generate tests on-the-fly from a model. – etc... – Test representation must be flexible. Test platform must not be “opinionated” though it must support frameworks that are.
  • 17. Implementation Challenges Test frameworks make assumptions Working directory contains test assembly. – Application base directory is same as working directory. – Can resolve references to test assembly dependencies. – If a test assembly has an associated configuration file, it is – loaded. x86-only tests run in x86 mode on x64. – Full trust security model. –
  • 18. Implementation Challenges Extensibility model mismatches. ReSharper wants plugins to be installed in – C:Program FilesJetBrainsReSharper... Visual Studio Test Tools must be able to load – custom test types from GAC or from Visual Studio Private Assemblies. TestDriven.Net can load a test framework – assembly from anywhere but it might not be able to resolve the references of that assembly.
  • 19. Implementation Challenges Test platform must be prepared to establish its own private hosting environment regardless of how it is loaded by 3rd party tools.
  • 20. Implementation Challenges Test hosts make assumptions Everything is running in a single process (for – debuggers and code profilers). Test code does not have lasting side effects upon – the host. Test structure: – Dynamic metadata rich hierarchy (Gallio) Static hierarchy rooted at project (ReSharper) Static flat list (Visual Studio) Ignored and not reported in results (TestDriven.net)
  • 22. Under the Hood: Test Model At test exploration time... All we have is static metadata. – Some data may not be available. – Might not be able to execute code. – Create a ITest Tree to describe exploration. – At test execution time… We have all the information. – Create a ITestStep Tree to describe execution. –
  • 23. Under the Hood: Test Model Tests have: Unique stable identifier. – Name. – Metadata. – Kind: Namespace, Fixture, Suite, Test, etc… Description. Documentation. Arbitrary key/value pairs. Children. – Dependencies. – Ordering. – Parameters. –
  • 24. Under the Hood: Test Model Caveats: We might define new tests at runtime. – Tests might have dynamic substructure – eg. Instances of parameterized tests. Test runners cannot assume static and dynamic – test structure are the same (but many do..)
  • 25. Under the Hood: Test Log Want to report test results uniformly. Simple document format. Primitives: Streams (Containers) – Failures, Warnings, Console Output, etc... Sections (Delimiters) – Markers (Embedded Metadata) – Diffs, Links, Highlights, Stack Traces Text – Attachments –
  • 26. Under the Hood: Reflection Tests can be explored before compilation! JetBrains ReSharper™ unit test runner – Abstract reflection layer Native .Net reflection wrappers. – ReSharper Code Model wrappers. (x2) – Visual Studio Code Model wrappers. – Cecil wrappers. – Enables test explorer to be polymorphic.
  • 27. Under the Hood: Reflection Abstract Reflection API IReflectionPolicy – ICodeElementInfo – IAssemblyInfo, IAttributeInfo, IConstructorInfo, IEventInfo, IFieldInfo, IGenericParameterInfo, IMemberInfo, IMethodInfo, INamespaceInfo, IParameterInfo, ITypeInfo CodeLocation, CodeReference – Access to Xml documentation comments. – Unexpected bonus: Uniformity IFunctionInfo: constructor or method. – ISlotInfo: field, property, parameter, or generic parameter. –
  • 28. Under the Hood: Pattern Test Framework Reflection-based frameworks are common. Demand for different syntaxes: BDD, etc… Typical solution: Syntax adapters: wrap another test framework. – Better solution: Reuse code test exploration strategy. – Define completely custom syntax. – Better user experience and branding potential. –
  • 29. Under the Hood: Pattern Test Framework IPattern Basic compositional unit of structure in a test. – “Abstract syntax” Three basic methods: – IsPrimary: Does this pattern declare something new? Consume: If this pattern is primary, produce something new from a given code element. Process: Enrich something else created by another pattern using a given code element.
  • 30. Under the Hood: Pattern Test Framework [PatternAttribute] Associates a pattern with a code element. – Most MbUnit v3 attributes are Pattern Attributes. – You can make a custom framework the same way.
  • 31. Under the Hood: Pattern Test Framework MbUnit v3 Examples: [Test]: Primary pattern that creates a new tests. – [SetUp]: Primary pattern that registers the – associated method in the “setup chain” of the containing fixture. [Description]: Secondary pattern that adds – descriptive metadata to a test or fixture. [Row]: Secondary pattern that adds a new data – source to a test or fixture.
  • 32. Under the Hood: Pattern Test Framework Might help you write a new test framework… Reflection-based test exploration. – General-purpose test execution engine. – Data binding. – etc... – Or forget all of this and build it from scratch… Just implement ITestFramework, ITestExplorer, – and ITestController to explore and execute tests.
  • 33. Lessons Learned Beware of hidden assumptions. All test hosts are a little different. – Protect the test frameworks and tools from – unanticipated variations in hosting. Version independence is mandatory.
  • 34. Lessons Learned Consolidation of the tool chain is very useful. This is a lot harder than it looks! If you plan to write your own test framework, – consider using Gallio as the underlying platform.
  • 35. Roadmap v3.0: First spike. Self-host. – Integrate with many different environments. – Challenge assumptions. Gain experience. – v3.1: Generalize and consolidate. Support non-.Net languages and workflows. – Simplify extensibility contracts. – Performance. –
  • 36. Gallio Futures Gallio is the nucleus of a growing suite of interoperable test tools. Ambience: A database for persistent test data. – Archimedes: An automation test case manager – including distributed test agent and test data warehouse. Dynamic languages, scripting languages, test DSLs and non .Net frameworks in v3.1.
  • 37. MbUnit Futures More built-in assertions. Provide “mixins” to assist with integration of 3rd party libraries such as Rhino.Mocks, Selenium and WatiN. ASP.Net hosting. .Net Framework 4.0 extensions.
  • 38. Ongoing and Upcoming Projects Gallio Book Mono Support Test Case Manager (Archimedes) Test Data Warehouse Distributed Test Runner Modeling Language for Integration Tests
  • 39. Volunteers Wanted! What do you want to do? Build your own stuff using Gallio. – Add new stuff to Gallio itself. – Promote Gallio. – Offer feedback and suggestions. – Help us write the Gallio Book. –