5 pages

Distributed Unit Testing: supporting multiple platforms accurately and efficiently


Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus


Colecciones : DIA. Artículos del Departamento de Informática y AutomáticaIUCE. Artículos del Instituto Universitario de Ciencias de la Educación GRIAL. Artículos del Grupo de Investigación en Interacción y E-learning
Fecha de publicación : nov-2006
Testing is the most basic way to check the evolution of a software project. A strong test suite helps development team assuring that a certain minimum is always kept. Release after release software must pass a test group, large enough to check, at least, the most common use cases. Results will numerically show project s progress. Depending on the project testing could be done on different platforms under various operating systems. Forcing race conditions and heavy load is also a desired feature for the test suite.



Publié par
Publié le 01 novembre 2006
Nombre de lectures 49
Langue Español
Core Technology
by Pablo Santos and Francisco J. Garcia
DistributedUnitTestingSupporting multiple platforms accuratelyand efficientlyAt Codice Software we design and develop software configuration management tools that runon various combinations of operating systems and hardware platforms. For instance, both serv-er and clients run on Windows XP/2000/2003/Vista, Linux, and Mac OS X. And since our soft-ware uses .NET, it runs on native Microsoft implementation for Windows and Mono for UNIX-like operating systems.There’s only one way to accurately the testing process. The key to our distributed testing solution isPCaobdlicoe  iSs oaf tSwoaftrew. aHree  cEangibneeer atand efficiently support platform com- PNUnit, short for “Parallel NUnit.” PNUnit is a modified version ofreached at nbinations such as these—testing, and the familiar NUnit (www.nunit.org) testing framework that waspsantosl@codicesoftware.com.lots of it. However, running a software originally ported from JUnit to .NET. The source code and relatedFranciscois a Professor ofpackage on 36 platform combina- files for PNUnit are available electronically; see “Resource Center,”CUonimvperustietry  Socf iSeanlcae mata tnhcea. Youtions, release after release, is a page 5.can reach him atHerculean effort. The solution we We were already using NUnit to develop unit tests because ourfgarcia@usal.esadopted was to distribute testing tasks development is .NET based. NUnit lets you write unit tests with allby running them in parallel. In addi- .NET languages, and even adhere to test-driven development princi-tion to uncovering bugs, this ples. Still, our primary concern was testing on multiple platformsapproach significantly speeded up using distributed test scenarios. Unfortunately, stock NUnit doesn’tsupport this, hence our decision to extend NUnit to support distrib-uted testing.One of the reasons we wanted to stick with the NUnit framework isthat we were familiar with its environment. Usually when you move toa new testing platform, the first thing you have to do is learn a newscripting language. By extending NUnit, we could use the same pro-gramming language and constructions (test suites, fixtures, and thelike) that we were used to with regular unit testing.Developing Automated Tests with PNUnitFigure 1 shows the basic structure and main components of thePNUnit system. Launcher is the program responsible for launchingtest suites on test machines. It is called by a test configuration fileas an argument, reads the file, and sends instructions to the testingmachines. It then gathers test results and prints them on thescreen. The test configuration (testconf) file is written in XML andcontains a definition of the test scenario being created. It defines
Agent.exeFigure 1:PNUnit high-level structure.28Dr. Dobb’s Journallwww.ddj.comlNovember 2006