SlideShare uma empresa Scribd logo
1 de 53
Baixar para ler offline
Conformance testing and standards


                            How do you know it works
                            if you don't know what
                            it's supposed to do?




                            Patrick Curran
                            JCP Chair
                            patrick@jcp.org

http://jcp.org          1
Standards make the world go round




http://jcp.org          2
Language




http://jcp.org   3
Writing




http://jcp.org   4
Number systems




http://jcp.org   5
Currency




http://jcp.org   6
Time...




http://jcp.org   7
And space




http://jcp.org   8
Weights and measures




http://jcp.org         9
Machine tools




http://jcp.org   10
Screws and threads




http://jcp.org       11
Interchangeable parts




http://jcp.org          12
Railways




http://jcp.org   13
Mass production




http://jcp.org    14
Shipping




http://jcp.org   15
Traffic




http://jcp.org   16
Beer




http://jcp.org   17
Chocolate




            WHO/FAO: Codex Alimentarius Official Standard for Chocolate
http://jcp.org                         18
Music




                 ISO 16:1975 Acoustics -- Standard tuning frequency
                             (Standard musical pitch)
http://jcp.org                            19
Color




                 http://www.color.org
http://jcp.org            20
Sport




             http://www.lords.org/laws-and-spirit/laws-of-cricket/laws/
http://jcp.org                         21
Medicine

                      Chronic rheumatic heart diseases
                      I05: Rheumatic mitral valve diseases
                      Includes:
                      conditions classifiable to 105.0 and 105.2-105.9,
                      whether specified as rheumatic or not
                      Excludes:
                      when specified as nonrheumatic
                      I05.0: Mitral stenosis
                      Mitral (valve) obstruction (rheumatic)
                      I05.1: Rheumatic mitral insufficiency
                      Rheumatic mitral
                      ● Incompetence

                      ●Regurgitation

                      I05.2: Mitral stenosis with insufficiency
                      Mitral stenosis with incompetence or regurgitation
                      I05.8:Other mitral valve diseases
                      Mitral (valve) failure
                      I05.9: Mitral valve disease, unspecified
                      Mitral (valve) disorder (chronic) NOS

                      From the World Health Organization
                      International Classification of Diseases

http://jcp.org   22
Shopping




http://jcp.org   23
Home entertainment




http://jcp.org       24
The Holy Grail


                      • Components,
                       systems, and
                       processes that are:
                        – Reproducible
                        – Predictable
                        – Reusable
                        – Interoperable
                        – Interchangeable


http://jcp.org   25
Then




http://jcp.org   26
Now

• We are no longer willing to buy all of our hardware and
  software from a single supplier.
• We want the freedom to chose and the option to switch.
    – All systems are heterogeneous.
• This requires standards.
    – For interfaces, so we can mix and match components.
    – For protocols, so systems can talk to each other.




http://jcp.org               27
Interfaces




http://jcp.org   28
Protocols




http://jcp.org   29
No vendor lock-in




http://jcp.org      30
Specifications...




http://jcp.org      31
Are not enough...

• Interoperability and interchangeability are harmed by:
• Poor-quality specs.
    – Imprecise or ambiguous, language.
• Poor-quality implementations.
    – Specified requirements are not met.
    – Specified requirements are implemented incorrectly.




http://jcp.org               32
We also need testing




http://jcp.org         33
Conformance testing

• The process of verifying that implementations of a
  technology conform to the specification.
• Tests only what is normatively required in the specification.
    – Quality, robustness, performance, usability, and other
      desirable attributes of software must not be tested (unless
      explicitly specified.)
• Can make no assumptions about the internals of the
  implementation (black-box testing.)
• Improves the quality of specifications:
    – by identifying ambiguities, contradictions, omissions,
• And of implementations:
    – by identifying failures to conform to the spec.


http://jcp.org                   34
What makes a good spec?

• Specify.
    – Unspecified or implementation-specific behaviour can't
      be tested.
• Require.
    – In clear, unambiguous language (see RFC 2119)
    – We like “must,” “shall,” “must not”...
    – We don't like “may,” “it's obvious,” “it's up to you”...
• Beware optional functionality.
    – Can be tested, but doesn't promote interoperability or
      application portability.
         • Developers won't know what they can depend on.
    – If you must, clearly define optionality with Profiles.

http://jcp.org                  35
Java: what?



                      Open, standards-based
                      technologies enabling
                      the development and
                      deployment of secure,
                      portable, reliable, and
                      scalable applications
                      on hardware platforms
                      from cellphones to
                      high-end servers.




http://jcp.org   36
Java: how?




http://jcp.org   37
Deliverables




http://jcp.org   38
Deliverables




http://jcp.org   39
Java conformance testing




http://jcp.org             40
Why conformance-test?

• To promote the compatibility and interoperability of Java
  technology implementations.
• To ensure that the technologies are well specified and that
  implementations conform to the specifications.
• Results:
    – Multiple compatible implementations are available.
    – Developers know how implementations will behave.




http://jcp.org                41
Compatibility

• Compatibility is a contractual obligation.
    – Shipping incompatible products is prohibited.
• Compatible products can use the Java name and
  display the Java Compatible logo.
• Compatibility is binary.
    – You can't be “almost compatible”
      or “a little bit incompatible.”
    – You must pass all the tests and meet all of the
      compatibility requirements.




http://jcp.org                42
Planning and building a high-quality TCK




http://jcp.org          43
A TCK is not just a collection of tests

• It should also include:
    – A test harness to automate execution.
    – Documentation explaining
         •   How to run the test suite.
         •   How to interpret test results.
         •   Compatibility Requirements (The Rules.)
         •   The test appeals process.
• It must be portable.
    – Unlike most other software, a TCK must be capable of
      running on systems that don't yet exist.
         • You can't test it on the platforms where it will be run!
• The Spec Lead must commit to ongoing maintenance.
    – Fix bugs, expand coverage.
http://jcp.org                    44
A good test is...

• Mappable to the specification.
    – You must know what portion of the specification it tests.
• Atomic.
    – Tests a single feature rather than multiple features.
• Self-documenting.
    – Explains what it is testing and what output it expects.
• Focused on the technology under test rather than on
  ancillary technologies.
• Useful.
    – Likely to catch real-world problems.
• Correct, efficient, portable, and maintainable.

http://jcp.org                  45
Specification markup

• Identify normative requirements (test assertions)
  within the spec.
• Provide feedback to the authors where the spec is
  ambiguous, contradictory, incomplete, or untestable.
• Publish an assertion list.
    – Ask the spec authors to review and approve it.
• This process significantly improves spec quality.




http://jcp.org               46
Test assertions

• A specific statement of functionality or behavior
  derived from a specification.
    – java.lang.Integer.toString(int i, int radix)
        • "If the radix is smaller than Character.MIN_RADIX
          or larger than Character.MAX_RADIX, then the radix
          10 is used instead."
    – “During preparation of a class or interface C, the Java
      virtual machine also imposes loading constraints
      (§5.3.4). Let L1 be the defining loader of C. For each
      method m declared in C that overrides a method declared
      in a superclass or superinterface, the Java virtual
      machine imposes the following loading constraints: Let
      T0 be the name of the type returned by m, and let T1, ...,
      Tn be the names of the argument types of m. Then
      TiL1=TiL2 for i = 0 to n (§5.3.4).”
http://jcp.org                 47
How many tests are enough?

 • There is no simple answer to this question.
      – It depends on your goals and on the available resources.
 • Aim to get the best possible coverage with the
   resources you have available.
 • You cannot do this unless you set explicit goals, and
   measure or estimate test coverage.




http://jcp.org                 48
Calculating coverage




http://jcp.org         49
Coverage analysis

 • Partition the spec.
      – By feature, APIs, language elements, testable assertions,
        logical sections, or even pages or paragraphs.
 • Estimate or measure the extent of coverage in each area
 • Breadth coverage (relatively simple)
    – What percentage of spec elements are covered by at
      least one test?
 • Depth coverage (more subjective)
      – On average, what percentage of the tests that would be
        required to completely test each element have actually
        been written?
           • (How thoroughly is each element tested?)

http://jcp.org                   50
Test development strategy

 • Define coverage goals.
      – Where should resources be focused?
      – How extensively should each area be tested?
 • Start with breadth (test everything minimally.)
 • Drill down (increase depth coverage) in selected areas.
 • Publish a test-coverage report.
      – Minimally, map tests to areas of the spec.
      – Ideally, provide counts and averages of the number of
        tests in each area.
 • This helps users to understand the strengths and
   weaknesses of the test suite.
 • It will also help you to improve the next version.
http://jcp.org                51
What to test and what not to test?

• “Full coverage” for the majority of real-world specs is
  impossible (impractical.)
• Don't just test what's easiest.
• Focus on areas where:
    – The consequences of non-conformance are greatest.
         • Eg, breaking interoperability or jeopardizing security.
    – Implementations are more likely to be non-conformant
      because:
         •   Implementation presents technical difficulties.
         •   The specification is ambiguous.
         •   Implementers are less likely to discover problems.
         •   Implementers have an incentive to cheat (eg, to increase
             performance.)
http://jcp.org                      52
Spec + RI + TCK =




http://jcp.org      53

Mais conteúdo relacionado

Destaque

Grow Taller Height
Grow Taller HeightGrow Taller Height
Grow Taller Heightsternalruckl
 
Предприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРА
Предприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРАПредприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРА
Предприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРАVadim Kotelnikov
 
Kane debt
Kane debtKane debt
Kane debtd0nn9n
 
董龙飞 - 新一代企业应用
董龙飞 - 新一代企业应用董龙飞 - 新一代企业应用
董龙飞 - 新一代企业应用d0nn9n
 
Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...
Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...
Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...Vadim Kotelnikov
 
Privacy in TMG - How to hide information
Privacy in TMG - How to hide informationPrivacy in TMG - How to hide information
Privacy in TMG - How to hide informationCarole Riley
 

Destaque (9)

Grow Taller Height
Grow Taller HeightGrow Taller Height
Grow Taller Height
 
Предприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРА
Предприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРАПредприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРА
Предприниматель-инноватор: КАК ПРИВЛЕЧЬ ВЕНЧУРНОГО ИНВЕСТОРА
 
Kane debt
Kane debtKane debt
Kane debt
 
As sitru-al-tajalli
As sitru-al-tajalliAs sitru-al-tajalli
As sitru-al-tajalli
 
董龙飞 - 新一代企业应用
董龙飞 - 新一代企业应用董龙飞 - 新一代企业应用
董龙飞 - 新一代企业应用
 
Fantoches de papel2
Fantoches de papel2Fantoches de papel2
Fantoches de papel2
 
Higiene bucal cmei 2010
Higiene bucal cmei 2010Higiene bucal cmei 2010
Higiene bucal cmei 2010
 
Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...
Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...
Бизнес-кейс: СОЗДАНИЕ ЦИФРОВОГО РЕНТГЕНА (история успеха инновационного проек...
 
Privacy in TMG - How to hide information
Privacy in TMG - How to hide informationPrivacy in TMG - How to hide information
Privacy in TMG - How to hide information
 

Semelhante a Patrick jcp

The art of system and solution testing
The art of system and solution testingThe art of system and solution testing
The art of system and solution testinggaoliang641
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...OPNFV
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP StackLorna Mitchell
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expertgaoliang641
 
Standardising Lab tests and data using SNOMED CT
Standardising Lab tests and data using SNOMED CTStandardising Lab tests and data using SNOMED CT
Standardising Lab tests and data using SNOMED CTJay Kola
 
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography & Mass Spectrometry Solutions
 
Understanding Android Benchmarks
Understanding Android BenchmarksUnderstanding Android Benchmarks
Understanding Android BenchmarksKoan-Sin Tan
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to useUma Ghotikar
 
MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...
MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...
MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...MIPI Alliance
 
SOFTWARE TESTING W1_watermark.pdf
SOFTWARE TESTING W1_watermark.pdfSOFTWARE TESTING W1_watermark.pdf
SOFTWARE TESTING W1_watermark.pdfShubhamSingh606946
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Lari Hotari
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008vipulkocher
 
1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx
1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx
1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptxabhivastrad007
 
Software engineering quality assurance and testing
Software engineering quality assurance and testingSoftware engineering quality assurance and testing
Software engineering quality assurance and testingBipul Roy Bpl
 
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography & Mass Spectrometry Solutions
 
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f..." Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...Lohika_Odessa_TechTalks
 
Using JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance TestingUsing JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance TestingXBOSoft
 

Semelhante a Patrick jcp (20)

The art of system and solution testing
The art of system and solution testingThe art of system and solution testing
The art of system and solution testing
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
 
Tool up your lamp stack
Tool up your lamp stackTool up your lamp stack
Tool up your lamp stack
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP Stack
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expert
 
Standardising Lab tests and data using SNOMED CT
Standardising Lab tests and data using SNOMED CTStandardising Lab tests and data using SNOMED CT
Standardising Lab tests and data using SNOMED CT
 
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
 
Manual testing
Manual testingManual testing
Manual testing
 
Understanding Android Benchmarks
Understanding Android BenchmarksUnderstanding Android Benchmarks
Understanding Android Benchmarks
 
Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
 
MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...
MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...
MIPI DevCon 2016: Robust Debug and Conformance Verification Ensures Interoper...
 
SOFTWARE TESTING W1_watermark.pdf
SOFTWARE TESTING W1_watermark.pdfSOFTWARE TESTING W1_watermark.pdf
SOFTWARE TESTING W1_watermark.pdf
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008
 
1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx
1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx
1779905011SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.pptx
 
Software engineering quality assurance and testing
Software engineering quality assurance and testingSoftware engineering quality assurance and testing
Software engineering quality assurance and testing
 
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
 
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f..." Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
 
CD
CDCD
CD
 
Using JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance TestingUsing JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance Testing
 

Mais de d0nn9n

腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)
腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)
腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)d0nn9n
 
腾讯大讲堂:55 企业法律风险防范
腾讯大讲堂:55 企业法律风险防范腾讯大讲堂:55 企业法律风险防范
腾讯大讲堂:55 企业法律风险防范d0nn9n
 
腾讯大讲堂:56 qzone安全之路
腾讯大讲堂:56 qzone安全之路腾讯大讲堂:56 qzone安全之路
腾讯大讲堂:56 qzone安全之路d0nn9n
 
腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里
腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里
腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里d0nn9n
 
腾讯大讲堂:57 超级qq的千万之路
腾讯大讲堂:57 超级qq的千万之路 腾讯大讲堂:57 超级qq的千万之路
腾讯大讲堂:57 超级qq的千万之路 d0nn9n
 
蔡学镛 Rebol漫谈
蔡学镛   Rebol漫谈蔡学镛   Rebol漫谈
蔡学镛 Rebol漫谈d0nn9n
 
赵泽欣 - 淘宝网前端应用与发展
赵泽欣 - 淘宝网前端应用与发展赵泽欣 - 淘宝网前端应用与发展
赵泽欣 - 淘宝网前端应用与发展d0nn9n
 
Yanggang wps
Yanggang wpsYanggang wps
Yanggang wpsd0nn9n
 
熊节 - 软件工厂的精益之路
熊节 - 软件工厂的精益之路熊节 - 软件工厂的精益之路
熊节 - 软件工厂的精益之路d0nn9n
 
谢恩伟 - 微软在云端
谢恩伟 - 微软在云端谢恩伟 - 微软在云端
谢恩伟 - 微软在云端d0nn9n
 
去哪儿平台技术
去哪儿平台技术去哪儿平台技术
去哪儿平台技术d0nn9n
 
吴磊 - Silverlight企业级RIA
吴磊 - Silverlight企业级RIA吴磊 - Silverlight企业级RIA
吴磊 - Silverlight企业级RIAd0nn9n
 
Tom - Scrum
Tom - ScrumTom - Scrum
Tom - Scrumd0nn9n
 
Tim - FSharp
Tim - FSharpTim - FSharp
Tim - FSharpd0nn9n
 
Tiger oracle
Tiger oracleTiger oracle
Tiger oracled0nn9n
 
Paulking groovy
Paulking groovyPaulking groovy
Paulking groovyd0nn9n
 
Paulking dlp
Paulking dlpPaulking dlp
Paulking dlpd0nn9n
 
Nick twitter
Nick twitterNick twitter
Nick twitterd0nn9n
 
Marc facebook
Marc facebookMarc facebook
Marc facebookd0nn9n
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soad0nn9n
 

Mais de d0nn9n (20)

腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)
腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)
腾讯大讲堂:62 拇指下的精彩(手机qq交互设计经验分享)
 
腾讯大讲堂:55 企业法律风险防范
腾讯大讲堂:55 企业法律风险防范腾讯大讲堂:55 企业法律风险防范
腾讯大讲堂:55 企业法律风险防范
 
腾讯大讲堂:56 qzone安全之路
腾讯大讲堂:56 qzone安全之路腾讯大讲堂:56 qzone安全之路
腾讯大讲堂:56 qzone安全之路
 
腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里
腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里
腾讯大讲堂:59 数据蕴含商机,挖掘决胜千里
 
腾讯大讲堂:57 超级qq的千万之路
腾讯大讲堂:57 超级qq的千万之路 腾讯大讲堂:57 超级qq的千万之路
腾讯大讲堂:57 超级qq的千万之路
 
蔡学镛 Rebol漫谈
蔡学镛   Rebol漫谈蔡学镛   Rebol漫谈
蔡学镛 Rebol漫谈
 
赵泽欣 - 淘宝网前端应用与发展
赵泽欣 - 淘宝网前端应用与发展赵泽欣 - 淘宝网前端应用与发展
赵泽欣 - 淘宝网前端应用与发展
 
Yanggang wps
Yanggang wpsYanggang wps
Yanggang wps
 
熊节 - 软件工厂的精益之路
熊节 - 软件工厂的精益之路熊节 - 软件工厂的精益之路
熊节 - 软件工厂的精益之路
 
谢恩伟 - 微软在云端
谢恩伟 - 微软在云端谢恩伟 - 微软在云端
谢恩伟 - 微软在云端
 
去哪儿平台技术
去哪儿平台技术去哪儿平台技术
去哪儿平台技术
 
吴磊 - Silverlight企业级RIA
吴磊 - Silverlight企业级RIA吴磊 - Silverlight企业级RIA
吴磊 - Silverlight企业级RIA
 
Tom - Scrum
Tom - ScrumTom - Scrum
Tom - Scrum
 
Tim - FSharp
Tim - FSharpTim - FSharp
Tim - FSharp
 
Tiger oracle
Tiger oracleTiger oracle
Tiger oracle
 
Paulking groovy
Paulking groovyPaulking groovy
Paulking groovy
 
Paulking dlp
Paulking dlpPaulking dlp
Paulking dlp
 
Nick twitter
Nick twitterNick twitter
Nick twitter
 
Marc facebook
Marc facebookMarc facebook
Marc facebook
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soa
 

Último

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 

Último (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 

Patrick jcp

  • 1. Conformance testing and standards How do you know it works if you don't know what it's supposed to do? Patrick Curran JCP Chair patrick@jcp.org http://jcp.org 1
  • 2. Standards make the world go round http://jcp.org 2
  • 18. Chocolate WHO/FAO: Codex Alimentarius Official Standard for Chocolate http://jcp.org 18
  • 19. Music ISO 16:1975 Acoustics -- Standard tuning frequency (Standard musical pitch) http://jcp.org 19
  • 20. Color http://www.color.org http://jcp.org 20
  • 21. Sport http://www.lords.org/laws-and-spirit/laws-of-cricket/laws/ http://jcp.org 21
  • 22. Medicine Chronic rheumatic heart diseases I05: Rheumatic mitral valve diseases Includes: conditions classifiable to 105.0 and 105.2-105.9, whether specified as rheumatic or not Excludes: when specified as nonrheumatic I05.0: Mitral stenosis Mitral (valve) obstruction (rheumatic) I05.1: Rheumatic mitral insufficiency Rheumatic mitral ● Incompetence ●Regurgitation I05.2: Mitral stenosis with insufficiency Mitral stenosis with incompetence or regurgitation I05.8:Other mitral valve diseases Mitral (valve) failure I05.9: Mitral valve disease, unspecified Mitral (valve) disorder (chronic) NOS From the World Health Organization International Classification of Diseases http://jcp.org 22
  • 25. The Holy Grail • Components, systems, and processes that are: – Reproducible – Predictable – Reusable – Interoperable – Interchangeable http://jcp.org 25
  • 27. Now • We are no longer willing to buy all of our hardware and software from a single supplier. • We want the freedom to chose and the option to switch. – All systems are heterogeneous. • This requires standards. – For interfaces, so we can mix and match components. – For protocols, so systems can talk to each other. http://jcp.org 27
  • 32. Are not enough... • Interoperability and interchangeability are harmed by: • Poor-quality specs. – Imprecise or ambiguous, language. • Poor-quality implementations. – Specified requirements are not met. – Specified requirements are implemented incorrectly. http://jcp.org 32
  • 33. We also need testing http://jcp.org 33
  • 34. Conformance testing • The process of verifying that implementations of a technology conform to the specification. • Tests only what is normatively required in the specification. – Quality, robustness, performance, usability, and other desirable attributes of software must not be tested (unless explicitly specified.) • Can make no assumptions about the internals of the implementation (black-box testing.) • Improves the quality of specifications: – by identifying ambiguities, contradictions, omissions, • And of implementations: – by identifying failures to conform to the spec. http://jcp.org 34
  • 35. What makes a good spec? • Specify. – Unspecified or implementation-specific behaviour can't be tested. • Require. – In clear, unambiguous language (see RFC 2119) – We like “must,” “shall,” “must not”... – We don't like “may,” “it's obvious,” “it's up to you”... • Beware optional functionality. – Can be tested, but doesn't promote interoperability or application portability. • Developers won't know what they can depend on. – If you must, clearly define optionality with Profiles. http://jcp.org 35
  • 36. Java: what? Open, standards-based technologies enabling the development and deployment of secure, portable, reliable, and scalable applications on hardware platforms from cellphones to high-end servers. http://jcp.org 36
  • 41. Why conformance-test? • To promote the compatibility and interoperability of Java technology implementations. • To ensure that the technologies are well specified and that implementations conform to the specifications. • Results: – Multiple compatible implementations are available. – Developers know how implementations will behave. http://jcp.org 41
  • 42. Compatibility • Compatibility is a contractual obligation. – Shipping incompatible products is prohibited. • Compatible products can use the Java name and display the Java Compatible logo. • Compatibility is binary. – You can't be “almost compatible” or “a little bit incompatible.” – You must pass all the tests and meet all of the compatibility requirements. http://jcp.org 42
  • 43. Planning and building a high-quality TCK http://jcp.org 43
  • 44. A TCK is not just a collection of tests • It should also include: – A test harness to automate execution. – Documentation explaining • How to run the test suite. • How to interpret test results. • Compatibility Requirements (The Rules.) • The test appeals process. • It must be portable. – Unlike most other software, a TCK must be capable of running on systems that don't yet exist. • You can't test it on the platforms where it will be run! • The Spec Lead must commit to ongoing maintenance. – Fix bugs, expand coverage. http://jcp.org 44
  • 45. A good test is... • Mappable to the specification. – You must know what portion of the specification it tests. • Atomic. – Tests a single feature rather than multiple features. • Self-documenting. – Explains what it is testing and what output it expects. • Focused on the technology under test rather than on ancillary technologies. • Useful. – Likely to catch real-world problems. • Correct, efficient, portable, and maintainable. http://jcp.org 45
  • 46. Specification markup • Identify normative requirements (test assertions) within the spec. • Provide feedback to the authors where the spec is ambiguous, contradictory, incomplete, or untestable. • Publish an assertion list. – Ask the spec authors to review and approve it. • This process significantly improves spec quality. http://jcp.org 46
  • 47. Test assertions • A specific statement of functionality or behavior derived from a specification. – java.lang.Integer.toString(int i, int radix) • "If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead." – “During preparation of a class or interface C, the Java virtual machine also imposes loading constraints (§5.3.4). Let L1 be the defining loader of C. For each method m declared in C that overrides a method declared in a superclass or superinterface, the Java virtual machine imposes the following loading constraints: Let T0 be the name of the type returned by m, and let T1, ..., Tn be the names of the argument types of m. Then TiL1=TiL2 for i = 0 to n (§5.3.4).” http://jcp.org 47
  • 48. How many tests are enough? • There is no simple answer to this question. – It depends on your goals and on the available resources. • Aim to get the best possible coverage with the resources you have available. • You cannot do this unless you set explicit goals, and measure or estimate test coverage. http://jcp.org 48
  • 50. Coverage analysis • Partition the spec. – By feature, APIs, language elements, testable assertions, logical sections, or even pages or paragraphs. • Estimate or measure the extent of coverage in each area • Breadth coverage (relatively simple) – What percentage of spec elements are covered by at least one test? • Depth coverage (more subjective) – On average, what percentage of the tests that would be required to completely test each element have actually been written? • (How thoroughly is each element tested?) http://jcp.org 50
  • 51. Test development strategy • Define coverage goals. – Where should resources be focused? – How extensively should each area be tested? • Start with breadth (test everything minimally.) • Drill down (increase depth coverage) in selected areas. • Publish a test-coverage report. – Minimally, map tests to areas of the spec. – Ideally, provide counts and averages of the number of tests in each area. • This helps users to understand the strengths and weaknesses of the test suite. • It will also help you to improve the next version. http://jcp.org 51
  • 52. What to test and what not to test? • “Full coverage” for the majority of real-world specs is impossible (impractical.) • Don't just test what's easiest. • Focus on areas where: – The consequences of non-conformance are greatest. • Eg, breaking interoperability or jeopardizing security. – Implementations are more likely to be non-conformant because: • Implementation presents technical difficulties. • The specification is ambiguous. • Implementers are less likely to discover problems. • Implementers have an incentive to cheat (eg, to increase performance.) http://jcp.org 52
  • 53. Spec + RI + TCK = http://jcp.org 53