Скачать презентацию LCG Software Process Infrastructure LCG-SPI SW-Testing LCG Скачать презентацию LCG Software Process Infrastructure LCG-SPI SW-Testing LCG

d93dd1b00cf64172a6f93a2d05c06bff.ppt

  • Количество слайдов: 17

LCG Software Process & Infrastructure LCG-SPI: SW-Testing LCG Applications Area Grid. PP 7 th LCG Software Process & Infrastructure LCG-SPI: SW-Testing LCG Applications Area Grid. PP 7 th Collaboration Meeting Manuel. [email protected] ch LCG/SPI LCG Software Process & Infrastructure M Gallas CERN EP-SFT LCG-SPI: SW-Testing 1

Outline and Context SPI SW-Testing 2 Overview Test Frame. Works User support Test policies Outline and Context SPI SW-Testing 2 Overview Test Frame. Works User support Test policies Test documents SW ing est -T p htt sp : // h/ n. c cer i. A n tio lica p Ap L SE A erim PI are ftw SPI project U so d gri ons s, etc) ati project c pli ents, rea LCG Infrastructure SI M • • •

SW-Testing Overview GOAL • Software testing will be an integral part of the software SW-Testing Overview GOAL • Software testing will be an integral part of the software development process. • All level of software testing should be run as part of an automatic process. Software testing Acceptance test LHC experiments System test Sw-testing team Integration test Unit test Nightly Building System SPI SW-Testing Automated testing Test Frame. Works Use in Exp. SW- testing support Examples SW-testing polices System Tests SW-testing doc Software developer Work Package Test CODE M Gallas CERN EP-SFT Integration Tests Code Documentation LCG-SPI: SW-Testing 3

SW-Testing Test Frame. Works Aim: to help developers: • to produce code for testing SW-Testing Test Frame. Works Aim: to help developers: • to produce code for testing • to run tests in automatic way Requirements: • Work with different languages (C++, Python, …) • Allow two ways of testing: “test the output of the code” and “test inside the testing-code”. • Easy way to integrate existing tests. • Allow the creation of dependencies among tests • Organize the tests by components or packages. • Regression testing • Easy integration with the Nightly Building System. • Provide also a graphical interface. Our constrains: • Avoid commercial software and licensing problems. • Avoid “do it yourself solutions” • Try to adopt commonly used open-source software. M Gallas CERN EP-SFT Our inputs: • Contacts within HEP-community. • What is available as free open source code. LCG-SPI: SW-Testing 4

SW-Testing Test Frame. Works: X-Unit family Cpp. Unit Py. Unit JUnit Qt. Unit A SW-Testing Test Frame. Works: X-Unit family Cpp. Unit Py. Unit JUnit Qt. Unit A simple test: 1. Subclass the Test. Case Cpp. Unit or Py. Unit class 2. Override the method run. Test(). 3. When you want to check a value, call the (Cpp. Unit or Py. Unit) ASSERT(bool) and pass in an expresion that is true if the test succeeds X-Unit family • Scope: Unit –testing • The same “assertion style” in different languages. • Provides: - The name of the test case that failed. -The name of the source file that contains the test. -The line number where the failure occurred • Different platforms/compilers: (Linux/Solaris/Windows) M Gallas CERN EP-SFT LCG-SPI: SW-Testing 5

SW-Testing Test Frame. Works: Oval: • validation and regression • used in CMS Test SW-Testing Test Frame. Works: Oval: • validation and regression • used in CMS Test Source Code Oval build Executable Oval run Ovalfile • Can be use for Unit-test to Validation tests. • Compare the output log file with a given reference file (Smart comparison of those lines which start with “[Oval]”) (configuration) Reference file Log file Oval diff • It is possible to set different run environments. • Can run external scripts and external binaries. M Gallas CERN EP-SFT LCG-SPI: SW-Testing 6

SW-Testing Test Frame. Works: QMTest • Uses a graphical interface for creating and running SW-Testing Test Frame. Works: QMTest • Uses a graphical interface for creating and running tests • Runs tests in parallel • Organizes tests hierarchically • Supports execution of a single test or many at once • Records dependencies between tests • Can be run in batch mode -> easy integration with the Nightly-Building systems M Gallas CERN EP-SFT LCG-SPI: SW-Testing 7

SW-Testing Test Frame. Works: Global picture Aim: to help developers: • to produce code SW-Testing Test Frame. Works: Global picture Aim: to help developers: • to produce code for testing • to run tests in automatic way QMTest • Uses a graphical interface for • • creating and running tests Runs tests in parallel Organizes tests hierarchically Supports execution of a single test or many at once Records dependencies between tests In LCG App. Area runs what is in the Oval. File and uses oval. M Gallas CERN EP-SFT Oval Cpp. Unit Oval • Py. Unit JUnit Oval. File Test Scripts Qt. Unit X-Unit family Log Valgrind LCG-SPI: SW-Testing Automated tests • Regression test file Ref file ? 8

SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies Test documents M Gallas CERN EP-SFT LCG-SPI: SW-Testing 9

SW-Testing User support: Web information http: //spi. cern. ch/ Policies Test Frame. Works How. SW-Testing User support: Web information http: //spi. cern. ch/ Policies Test Frame. Works How. To Test doc M Gallas CERN EP-SFT LCG-SPI: SW-Testing 10

User support: Tools supported SW-Testing Provided as free software by the SPI External Software User support: Tools supported SW-Testing Provided as free software by the SPI External Software Service Cpp. Unit Py. Unit Oval QMTest • Different platforms: (Linux/Solaris/Windows) • Different compilers • Integrated with SCRAM and ready to be used • Installed in AFS/DFS • Instructions to install them in a local machine How to use them ? M Gallas CERN EP-SFT LCG-SPI: SW-Testing 11

SW-Testing User support: How-To * * 1 2 3 Follow sw-testing policies M Gallas SW-Testing User support: How-To * * 1 2 3 Follow sw-testing policies M Gallas CERN EP-SFT * LCG-SPI: SW-Testing 12

SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies Test documents M Gallas CERN EP-SFT LCG-SPI: SW-Testing 13

SW-Testing Sw-Testing policies http: //spi. cern. ch/software_development. html Sw-testing policies are needed to ensure: SW-Testing Sw-Testing policies http: //spi. cern. ch/software_development. html Sw-testing policies are needed to ensure: • Software is created together with the tests. • Test directory structure and naming should be homogeneous and this will imply easy life to have automatic tools. • Common and well integrated tools M Gallas CERN EP-SFT For the projects For the developers For the testing responsible LCG-SPI: SW-Testing 14

SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies Test documents M Gallas CERN EP-SFT LCG-SPI: SW-Testing 15

SW-Testing Test Documents • For all project is needed a Test Plan in order SW-Testing Test Documents • For all project is needed a Test Plan in order to have a clear idea of the type of tests, schedule, environment and responsibilities. • We use a template • Test Case template collects information about the existing tests and how they cover the expected functionality of the software. M Gallas CERN EP-SFT LCG-SPI: SW-Testing 16

SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies SW-Testing SPI SW-Testing • • • Overview Test Frame. Works User support Test policies Test documents Conclusions: Software testing is an important task and we have tools in place to do it. Thanks to: • PPARC • LHC experiments • LCG Feedback and interaction are always welcome!! M Gallas CERN EP-SFT LCG-SPI: SW-Testing 17