AIDA Proxy Unit Tests Hurng-Chun Lee Academia Sinica Computing Centre, Taiwan.

Slides:



Advertisements
Similar presentations
Physicist Interfaces Project an overview Physicist Interfaces Project an overview Jakub T. Moscicki CERN June 2003.
Advertisements

J-Unit Framework.
Why ROOT?. ROOT ROOT: is an object_oriented frame work aimed at solving the data analysis challenges of high energy physics Object _oriented: by encapsulation,
Status of PI Analysis Services Lorenzo Moneta CERN AIDA Workshop 1/7/2003.
AA Internal Review, 21 October /2/2015 Vincenzo Innocente CERN/EP  Project Status and plan Vincenzo Innocente.
Program Name Developed by Team Name Student1, Student2, Student3, Student4.
AP Computer Science.  Not necessary but good programming practice in Java  When you override a super class method notation.
Presentation Outline What is JUnit? Why Use JUnit? JUnit Features Design of JUnit Downloading JUnit Writing Tests – TestCase – TestSuite Organizing The.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
C++ Functions. 2 Agenda What is a function? What is a function? Types of C++ functions: Types of C++ functions: Standard functions Standard functions.
Quality Assurance and Testing in LCG CHEP 2004 Interlaken, Switzerland 30 September 2004 Manuel Gallas, Jakub MOSCICKI CERN
Debugging, Build and Version Control Rudra Dutta CSC Spring 2007, Section 001.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Lecture 6 Software Testing and jUnit CS140 Dick Steflik.
M Gallas CERN EP-SFT LCG-SPI: SW-Testing1 LCG-SPI: SW-Testing LCG Applications Area GridPP 7 th Collaboration Meeting LCG/SPI LCG.
Computer Science and Engineering College of Engineering The Ohio State University JUnit The credit for these slides goes to Professor Paul Sivilotti at.
Data Structures Using C++ 2E
Christian Klar and Peter Neuhaus Working group ‚Agroecosystems‘ Designing an object-oriented architecture for process- based modelling of soil.
Middle-tier servers for CMW Bartek Paszkowski AB-CO-FC.
Nightly Releases and Testing Alexander Undrus Atlas SW week, May
IX International Workshop on Advanced Computing and Analysis Techniques in Physics Research KEK, Tsukuba, December 2003
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
The Data Grid: Towards an Architecture for the Distributed Management and Analysis of Large Scientific Dataset Caitlin Minteer & Kelly Clynes.
Java Root IO Part of the FreeHEP Java Library Tony Johnson Mark Dönszelmann
Software Measurement & Metrics
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett A Lightweight Histogram Interface Layer CHEP 2000 Session F (F320) Thursday.
Software Quality Metrics
07 Apr, 2000 GAUDI Histograms Pavel Binko, LHCb / CERN 1 LHCb Software Week GAUDI Histograms Pavel Binko LHCb / CERN.
Using JAS3 for LCD Analysis Tony Johnson 20 th May 2003.
_______________________________________________________________CMAQ Libraries and Utilities ___________________________________________________Community.
Version 5. ¿What is PAF? PAF is a tool to easily and quickly implement… …distributed analysis over ROOT trees. …by hiding as much as possible the inherent.
A Technical Validation Module for the offline Auger-Lecce, 17 September 2009  Design  The SValidStore Module  Example  Scripting  Status.
LCG-SPI: SW-Testing LCG AppArea internal review (20/10/03)
S. Guatelli, A. Mantero, J. Moscicki, M. G. Pia Geant4 medical simulations in a distributed computing environment 4th Workshop on Geant4 Bio-medical Developments.
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
JUnit Adam Heath. What is JUnit?  JUnit is a unit testing framework for the Java programming language  It allows developers to swiftly and easily test.
CLAS12 software paradigm My two cents… Vardan Gyurjyan Friday, August 26, 2005.
Design Patterns -- Omkar. Introduction  When do we use design patterns  Uses of design patterns  Classification of design patterns  Creational design.
M Gallas CERN EP-SFT LCG-SPI: SW-Testing1 LCG-SPI: SW-Testing QMTest test framework LCG AppArea meeting (16/07/03) LCG/SPI LCG Software.
1 N. BrunerUniv. of New Mexico MuTr Software  Online  Calibration  Offline.
Status Report of  Analysis Services Lorenzo Moneta CERN/EP-SFT Application Area Meeting, 9 July 2003.
CS 490 Software Testing Fall 2009 Implement Unit Test Framework for Application running on a Pocket PC 2003 device 09/18/091 Framework for Unit-testing.
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev ROOT 2002 GSI Online Offline Object Oriented Go4.
Faculty Advisor – Dr. Suraj Kothari Client – Jon Mathews Team Members – Chaz Beck Marcus Rosenow Shaun Brockhoff Jason Lackore.
Copyright © 2002 OSI Software, Inc. All rights reserved. PI Application Framework Example Applying the Application Framework.
Software Engineering Saeed Akhtar The University of Lahore.
Software Engineering Overview DTI International Technology Service-Global Watch Mission “Mission to CERN in Distributed IT Applications” June 2004.
Development of e-Science Application Portal on GAP WeiLong Ueng Academia Sinica Grid Computing
The Statistical Testing Project Stefania Donadio and Barbara Mascialino January 15 TH, 2003.
G.Govi CERN/IT-DB 1 September 26, 2003 POOL Integration, Testing and Release Procedure Integration  Packages structure  External dependencies  Configuration.
Implementation Basics in C# code Minimal C++ code Application logic in Java code.
Test a Little, Code a Little Colin Sharples IBM Global Services New Zealand Colin Sharples IBM Global Services New Zealand.
EGI-InSPIRE RI EGI-InSPIRE EGI-InSPIRE RI Monitoring of the LHC Computing Activities Key Results from the Services.
Summary of the AIDA workshop AIDA Workshop, July What is AIDA  AIDA defines today interfaces for some common analysis data objects  IHistogram,
Susanna Guatelli Geant4 in a Distributed Computing Environment S. Guatelli 1, P. Mendez Lorenzo 2, J. Moscicki 2, M.G. Pia 1 1. INFN Genova, Italy, 2.
Random Logic l Forum.NET l State Machine Mechanism Forum.NET 1 st Meeting ● December 27, 2005.
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March “The goal of the AIDA project is to define abstract.
20 October 2005 LCG Generator Services monthly meeting, CERN Validation of GENSER & News on GENSER Alexander Toropin LCG Generator Services monthly meeting.
FUNCTIONS (C) KHAERONI, M.SI. OBJECTIVE After this topic, students will be able to understand basic concept of user defined function in C++ to declare.
OGSA-DAI.
Virtual University of Pakistan Distributed database Management Systems Lecture 03.
PEGASUS: A frame for GNSS Data Evaluation
Potential use of JAS/JAIDA etc. SAS J2EE Review
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
Project Status and Plan
Reference Parameters.
Simulation in a Distributed Computing Environment
S.Linev, J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Presentation transcript:

AIDA Proxy Unit Tests Hurng-Chun Lee Academia Sinica Computing Centre, Taiwan

AIDA Proxy Layer v C++ proxy classes to AIDA interfaces r “Value semantics” for AIDA objects r Implemented using the “Proxy” pattern, very easy !  Based only on AIDA Interfaces  no dependency on a given implementation v Initially “hiding” of AIDA object management r AIDA tree is not exposed to users but hided in the Proxy implementation v Keeping the functionality and signatures of AIDA r “re-shuffling” of factory methods to object constructors

Purposes of the Tests v Checking the functionalities of AIDA Proxy v Checking the consistencies between different histogram implementations through AIDA Proxy r Or obtaining the differences between implementations v Creating the unit test framework for AIDA Proxy on which the new tests can be easily adapted

Current Status v pi_aida Classes covered by the tests r Histogram1D, 2D, 3D r Cloud1D, 2D, 3D r Profile1D, 2D r DataPointSet r HistoProjector, ProxyStore v Over 1000 CppUnit assertions for consistency tests between Native and ROOT implementations v All independent tests have been integrated in Oval and QMtest

Hierarchical Structure of Unit Tests Test Group Test Cases Test Suite xUnit

3D Histogram 2D Histogram 1D Histogram Mean, RMS binMean, binError... Unit Tests of AIDA Proxy CppUnit I/OCopyImplement

Testing Logic Reference Histogram Target Histogram mean Equal? RMS Equal? binRms Equal? Implementation Copy File I/O Histogram Sources: Feeding with the data points Copying from different implementation Reading from XML/ROOT file Test Suites Test Cases

Test Suite Categories v Implementation v Copy v File I/O Data Points Ref. Histogram Tgt. Histogram Consistency tests Data Points Ref. Histogram Tgt. Histogram Consistency tests Data Points Ref. Histogram Tgt. Histogram Consistency tests File Feed Copy Output Input

Data Points (Histogram View) v Specific numbers r (-2.99, -1.05, 1.5, 5.65, 9.99, 10.01) v Random distribution r 1000 numbers r Range: [0,1] v Gaussian distribution r 1000 numbers r Mean:0 StdDev: 0.5

Code examples (Test Cases) v Test case implementations of CppUnit::TestFixture r Tests of global statistics r Tests of local (per bin) statistics r Tests of annotations void Histogram1D_TCase::tstMean() { CPPUNIT_ASSERT_DOUBLES_EQUAL(refHist->mean(),trgHist->mean(),10e-6); } void Histogram1D_TCase::tstBinMean() { for(unsigned int i=0; i axis().bins(); i++) { CPPUNIT_ASSERT_DOUBLES_EQUAL(refHist->binMean(i),trgHist->binMean(i),10e-6); } class Histogram1D_TCase : public CppUnit::TestFixture { pi_aida::Histogram1D *refHist, *trgHist; void tstMean(); void tstBinMean(); void tstTitle(); } Histogram1D_TCase.h Histogram1D_TCase.cpp void Histogram1D_TCase::tstTitle() { CPPUNIT_ASSERT_EQUAL(refHist->title(),trgHist->title()); }

Code Example (Test Suites) v Ref./Tgt. Histogram and Test Case Specification class Histogram1D_Impl : public Histogram1D_TCase { CPPUNIT_TEST_SUITE(Histogram1D_Impl); CPPUNIT_TEST(tstMean); CPPUNIT_TEST(tstRms); CPPUNIT_TEST(tstTitle); CPPUNIT_TEST_SUITE_END(); refHist = new pi_aida::Histogram1D(“1D Native Histogram”,10,0,1, “AIDA_Native_Histogram”); trgHist = new pi_aida::Histogram1D(“1D ROOT Histogram”,10,0,1, “AIDA_Root_Histogram”); dg = new DataGen; dg->random(); for(unsigned int i=0; i feeds.size(); i++); refHist->fill(dg->feeds[i],dg->weight[i]); trgHist->fill(dg->feeds[i],dg->weight[i]); } Histogram Initialization Data Point Insertion Test Case Specification

Testing Results v PI version: PI_1_0_0 v 161 (~15%) failures in 1051 CppUnit assertions v Failures are due to: r The mixture of bugs in AIDA Proxy and implementation differences v PI version: PI_1_1_0-pre1 v 104 (~9%) failures in 1164 CppUnit assertions v Failures are due to: r Implementation differences – Root takes the binCentres instead of the values to calculate the global mean in H3D and Profiles – Root doesn’t store the binMean – Error treatment in Profile

Summary & Future works v Summary r New CppUnit based test package for AIDA Proxy Layer has been available from PI release (Thanks Lorenzo, Andreas and Vincenzo for the inputs and discussions) r New tests can be easily added on by extending one of the three (Group/Suite/Case) levels in the hierarchical testing structure r All independent tests were integrated in Oval and QMtest (Thanks Manuel) v Future Works r Unit tests on Tuple, Fitter and Minimizer will be included in the coming PI release