Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.239.649 Times

Test::Extreme 0.12

  Date Added: October 26, 2010  |  Visits: 960

Test::Extreme

Report Broken Link
Printer Friendly Version


Product Homepage
Download (98 downloads)



Test::Extreme is a perlish unit testing framework. SYNOPSIS # In ModuleOne.pm combine unit tests with code package ModuleOne; use Test::Extreme; sub foo { return 23 }; sub test_foo { assert_equals foo, 23 } # at the end of the module run_tests ModuleOne if $0 =~ /ModuleOne.pm$/; # To run the tests in this module on the command line type perl ModuleOne.pm # If you have tests in several modules (say in ModuleOne.pm, # ModuleTwo.pm and ModuleThree.pm, create test.pl containing # precisely the following: use ModuleOne; use ModuleTwo; use ModuleThree; run_tests ModuleOne, ModuleTwo, ModuleThree, # Then run these tests on the command line with perl test.pl # If you prefer to get Perls classic "ok/not ok" output use # replace run_tests with run_tests_as_script in all of the # above # Also take a look at Test/Extreme.pm which includes its own # unit tests for how to instrument a module with unit tests Test::Extreme is a perlish port of the xUnit testing framework. It is in the spirit of JUnit, the unit testing framework for Java, by Kent Beck and Erich Gamma. Instead of porting the implementation of JUnit we have ported its spirit to Perl. The target market for this module is perlish people everywhere who value laziness above all else. Test::Extreme is especially written so that it can be easily and concisely used from Perl programs without turning them into Java and without inducing object-oriented nightmares in innocent Perl programmers. It has a shallow learning curve. The goal is to adopt the unit testing idea minus the OO cruft, and to make the world a better place by promoting the virtues of laziness, impatience and hubris. You test a given unit (a script, a module, whatever) by using Test::Extreme, which exports the following routines into your namespace: assert $x - $x is true assert_true $x - $x is true assert_false $x - $x is not true assert_passed - the last eval did not die ($@ eq "") assert_failed - the last eval caused a die ($@ ne "") assert_some $x - $x is true assert_none - $x is false assert_equals $x, $y - recursively tests arrayrefs, hashrefs and strings to ensure they have the same contents assert_contains $string, $list - $list contains $string assert_subset $element_list, $list - $element_list is a subset of $list (both are arrayrefs) assert_is_array $x - $x is an arrayref assert_is_hash $x - $x is a hashref assert_is_string $x - $x is a scalar assert_size N, $list - the arrayref contains N elements assert_keys [k1, k2], $hash - $hash contains k1, k2 as keys run_tests_as_script - run all tests in package main and emit Perls classic "ok/not ok" style output run_tests_as_script NS1, NS2, ... - run all tests in package main, NS1, NS2, and so on and emit Perls classic "ok/not ok" style output run_tests - run all tests in package main run_tests NS1, NS2, ... - run all tests in package main, NS1, NS2, and so on For an example on how to use these assert take a look at Test/Extreme.pm which includes it own unit tests and illustrates different ways of using these asserts. The function run_tests finds all functions that start with the word test (preceded by zero or more underscores) and runs them one at a time. It looks in the main namespace by default and also looks in any namespaces passed to it as arguments. Running the tests generates a status line (a "." for every successful test run, or an "F" for any failed test run), a summary result line ("OK" or "FAILURES!!!") and zero or more lines containing detailed error messages for any failed tests. To get Perls classic "ok/not ok" style output (which is useful for writing test scripts) use run_tests_as_script instead of run_tests..

Requirements: No special requirements
Platforms: Linux
Keyword: Assert Libraries List Moduleone Pm Testextreme Testing Tests Unit Unit Testing Unit Tests X Is
Users rating: 0/10

License: Freeware Size: 5.12 KB
USER REVIEWS
More Reviews or Write Review


TEST::EXTREME RELATED
Libraries  -  Test::Unit::tests::AllTests 0.14
Test::Unit::tests::AllTests is a unit testing framework self tests. SYNOPSIS # command line style use perl TestRunner.pl Test::Unit::tests::AllTests # GUI style use perl TkTestRunner.pl Test::Unit::tests::AllTests This class is used by...
45.06 KB  
Libraries  -  Test::Unit::Runner::Terminal 0.25
Test::Unit::Runner::Terminal is a unit testing framework helper class. SYNOPSIS use Test::Unit::Runner::Terminal; my $testrunner = Test::Unit::Runner::Terminal->new(); $testrunner->start($my_test_class); This class is a test runner for...
75.78 KB  
Programming  -  Unit Testing Framework - XSLT 0.0.8.alpha
Unit Testing Framework - XSLT (UTF-X) is a JUnit extension for testing XSLT stylesheets.
12.09 MB  
Libraries  -  Math::BigInt 1.87
Math::BigInt is an arbitrary size integer/float math package. SYNOPSIS use Math::BigInt; # or make it faster: install (optional) Math::BigInt::GMP # and always use (it will fall back to pure Perl if the # GMP library is not installed): #...
194.56 KB  
Programming  -  Mac TeX Toolbox 201
The Mac TeX Toolbox provides an umbrella for TeX related development for Mac OS X: discussions, pointers to libraries and other support for open source TeX development on Mac OS X.
1.51 MB  
Development Tools  -  SW Test Automation Framework 3.2.5
The Software Testing Automation Framework (STAF) is an open source, multi-platform, multi-language framework designed around the idea of reusable components, called services (such as process invocation, resource management, logging, and...
 
Modules  -  Show Customers per Products Ordered 3.1
This contribution allows admin to list the customers who did buy a certain product (eg product X) and view the customers who did not buy this X product.This is usefull when you want to promote certain products to a group of users. Admin can see...
 
Email  -  PHPKode Newsletter 2.1
PHPKode Newsletter X is a web-based, easy-to-use PHP newsletter software and email marketing software created to manage your mailing list and start your email marketing campaigns. It is easy to integrate into any website to help you keep constant...
10 KB  
Programming  -  DILM 0.4.1
Dilm is a distribution list management program written in C++ using the Qt toolkit and it is released under the GPL. Dlim is intended to be used for making lists of Linux distributions released over any period of time. The program...
40.96 KB  
Libraries  -  List::MoreUtils 0.22
List::MoreUtils is a Perl module that can provide the stuff missing in List::Util. SYNOPSIS use List::MoreUtils qw(any all none notall true false firstidx first_index lastidx last_index insert_after insert_after_string apply after after_incl...
22.53 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB