Tool for Automated Testing P. Sivera European Southern Observatory Garching – January 2007ESO.

Slides:



Advertisements
Similar presentations
Automated Unit Test Package For Tcl Procedures March 25, 2017
Advertisements

Shell Script Assignment 1.
Tokyo July, 2005 Deployment of ACS components Bogdan Jeram European Southern Observatory.
A Guide to Unix Using Linux Fourth Edition
CS Lecture 11 Outline Compiling C programs using gcc Archiving modules Using Makefiles Debugging using gdb Assignment 3 discussion Lecture 111CS.
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
Introduction to Unix – CS 21 Lecture 13. Lecture Overview Finding files and programs which whereis find xargs Putting it all together for some complex.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 9.
UNIX. find command ● The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files.
Linux & Shell Scripting Small Group Lecture 4 How to Learn to Code Workshop group/ Erin.
Linux Commands LINUX COMMANDS.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Advanced File Processing
Introduction to Shell Script Programming
Development tools cvs, tkdiff, JBuilder, building GATE from the sources.
Unix Talk #2 (sed). 2 You have learned…  Regular expressions, grep, & egrep  grep & egrep are tools used to search for text in a file  AWK -- powerful.
Compiled Matlab on Condor: a recipe 30 th October 2007 Clare Giacomantonio.
Launch SpecE8 and React from GSS. You can use the chemical analyses in a GSS data sheet to set up and run SpecE8 and React calculations. Analysis → Launch…
GNU Compiler Collection (GCC) and GNU C compiler (gcc) tools used to compile programs in Linux.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Lecture 4  C Shell Scripts(Chapter 10). Shell script/program  Shell script: a series of shell commands placed in an ASCII text file  Commands include.
Introduction to Bash Programming Ellen Zhang. Previous three classes What have we learnt so far ?
Writing Shell Scripts ─ part 3 CSE 2031 Fall October 2015.
Linux Operations and Administration
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
ALMA Common Software Basic Track Test Driven Development Unit testing and TAT.
Makefile M.A Doman. Compiling multiple objects Card.cpp -> Card.o Deck.cpp -> Deck.o main.cpp -> main.o main.o Deck.o Card.o -> Dealer.exe.
ACS Component Simulator J. Ibsen European Southern Observatory Garching – January 2007ESO.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Running ACS Bogdan Jeram European Southern Observatory July 2005NAOJ.
ESO - Garching 23 June – 02 July, 2003 ACS Course JUnit for Java Unit Testing H. Sommer.
Installation Tutorial Paola Sivera ESO ACS 2.1 for Linux RH7.2.
Final Exam Review May 3 rd, 2004 Class Meeting 15.
5 1 Data Files CGI/Perl Programming By Diane Zak.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Chapter Six Introduction to Shell Script Programming.
Executable scripts. So far We have made scripts echo hello #for example And called it hello.sh Run it as sh hello.sh This only works from current directory?
1 Day 18 Bash and the.files. 2 The.files ls shows you the files in your directory –Or at least most of them. –Some files are hidden. Try: ls –a –This.
CHEP ' 2003David Chamont (CMS - LLR)1 OVAL A testing tool for CMS software
Sed. Class Issues vSphere Issues – root only until lab 3.
Makefiles1 MAKEFILES Purpose: contain UNIX commands and will run them in a specified sequence. Syntax Definition : { Section-name: {unix command #1} …
C code organization CSE 2451 Rong Shi. Topics C code organization Linking Header files Makefiles.
Introduction to Bash Shell. What is Shell? The shell is a command interpreter. It is the layer between the operating system kernel and the user.
CS 330 Class 8 Homework A pattern that contains a word with an optional period A pattern that contains Fred with a space (not Freddy) See regexp.txt guest4.htm.
Lesson 6-Using Utilities to Accomplish Complex Tasks.
Brandon Packard. Why make? So far, you have probably worked on relatively small projects Coding projects can become huge My research consists of 1600.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
UNIX Development: g++ and make CS 2204 Class meeting 8 Created by Doug Bowman, 2001 Modified by Mir Farooq Ali, 2002.
Makefiles Manolis Koubarakis Data Structures and Programming Techniques 1.
Bash Introduction (adapted from chapters 1 and 2 of bash Cookbook by Albing, Vossing, & Newham) CPTE 440 John Beckett.
Shell Script Assignment 1.
Writing Shell Scripts ─ part 3
Writing Shell Scripts ─ part 3
John Carelli, Instructor Kutztown University
Guide To UNIX Using Linux Third Edition
Cmake Primer.
Data Structures and Programming Techniques
The Linux Command Line Chapter 24
RegRipper Harlan Carvey.
Good Testing Practices
“Shell Scripting” with SML
Linux Commands LINUX COMMANDS.
Executing Host Commands
CMPSC 60: Week 5 Discussion
The Linux Command Line Chapter 24
Presentation transcript:

Tool for Automated Testing P. Sivera European Southern Observatory Garching – January 2007ESO

ALMA Project Garching, January 2007Tool for Automated Testing2 tat tat - Tool for Automated Testing –run multiple tests with one command –produce reproducible output –automatic setup –compare output against reference file(s)

ALMA Project Garching, January 2007Tool for Automated Testing3 How tat works Looks for /test/TestList Redefine LD_LIBRARY_PATH, PYTHONPATH, PATH Executes “make clean all” Source a tcl script for additional env vars Executes a prologue script Executes the tests suite and compare output with the reference Executes an epilogue script Executes “make clean”

ALMA Project Garching, January 2007Tool for Automated Testing4 TestList directives 1.SOURCE 2.PROLOGUE [ ] 3. (1 or more) 4.EPILOGUE [ ] The 3rd directive is the only mandatory one

ALMA Project Garching, January 2007Tool for Automated Testing5 TestList syntax Blank lines are allowed Comment lines start with “#” A test directive can be split on multiple lines => continuation character is “\”

ALMA Project Garching, January 2007Tool for Automated Testing6 Test case syntax [.. ] Ex: 1 mySimpleTest checkCompStatus 2 myComplexTest sendMsg checkCompStatus setParam makeCrash 3 myComplexTest sendMsg 10” checkCompStatus 10” “setParam 3” 10” makeCrash

ALMA Project Garching, January 2007Tool for Automated Testing7 Cookbook - 1 getTemplate for MODROOT getTemplate for Makefile under test getTemplate for script/program update Makefile write/try the script/program prepare TestList

ALMA Project Garching, January 2007Tool for Automated Testing8 Cookbook – 2 create reference file: $ tat –g testscript Reference file acstHello.sh.ref generated Reference file generated. run the test: $ tat testscript TEST acstHello.sh PASSED. PASSED.

ALMA Project Garching, January 2007Tool for Automated Testing9 How to deal with the CDB Create directory: test/CDB Put your CDB files Redefine environment variable: ACS_CDB=`pwd` (in the SOURCE script)

ALMA Project Garching, January 2007Tool for Automated Testing10 How to run tat Run as –tat (make all, source, prologue, test suite, compare with ref, epilogue, make clean) or –tat makeEnv (make all, source, prologue) –tat or tat –tat cleanEnv (epilogue, make clean)

ALMA Project Garching, January 2007Tool for Automated Testing11 Some options -v to run tat in verbose mode -nc (not clean) to run “make all” and not “make clean all” -f to use another different testlist besides the TestList

ALMA Project Garching, January 2007Tool for Automated Testing12 Files and log files TestList.grep → grep –v –f TestList.grep TestList.sed → sed –f TestList.sed test/tatlogs/run$$ →.out, out.orig and.diff (.diff is the unix diff between.ref and.out)

ALMA Project Garching, January 2007Tool for Automated Testing13 Example of SOURCE SOURCE needs a tcl script under test dir Add a line in TestList.lite: SOURCE.tcl Write the file: set env(VARIABLE) WHATEVER

ALMA Project Garching, January 2007Tool for Automated Testing14 Example of prologue #! /bin/bash acsStart > $ACS_TMP/acsStart.log 2>&1 & sleep 3 acsStartContainer bilboContainer >$ACS_TMP2/bilbo.log 2>&1 & sleep 3 See standard prologue: $ACSROOT/bin/acsutilTATPrologue

ALMA Project Garching, January 2007Tool for Automated Testing15 Example of epilogue #! /bin/bash acsStopContainer bilboContainer >bilboStop.log 2>&1 sleep 3 acsStop >acsStop.log 2>&1 sleep 3 See standard epilogue: $ACSROOT/bin/acsutilTATEpilogue