Test::More

Test::More
Original authorMichael G Schwern
DeveloperChad 'Exodist' Granum
Initial releaseApril, 2001
Written inPerl
Operating systemCross-platform
Available inEnglish
TypeUnit testing module
LicenseDual-licensed - Artistic License and GPL
Websitehttps://metacpan.org/pod/Test::More

Test::More is a unit testing module for Perl. Created and maintained by Michael G Schwern with help from Barrie Slaymaker, Tony Bowden, chromatic, Fergal Daly and perl-qa.

Test::More is a widely used Perl testing module. As of 2010, approximately 80% of all CPAN distributions made use of it.[1]

History

Introduced in 2001 to replace Test.pm, Test::More contributed to changes in testing practices in Perl and was followed by the development of additional testing modules and broader adoption of test-driven practices within the community.

In 2014, Michael Schwern transferred ownership of Test::More and related modules to Chad 'Exodist' Granum.[2] On May 10, 2016, Exodist released version 1.302015,[3][4] which included a complete refactor and partial rewrite of the internals. The new version included major API updates and additional features. Efforts were made to preserve backwards compatibility for third-party tools.[tone]

Functionality

Test::More is not a complete testing framework but can be used with other testing libraries via a shared Test::Builder object. As a result, Test::More provides the baseline testing functions, leaving other libraries to implement more specific functionality. This avoids centralizing development in a single module and supports the use of specialized testing functions.

Test programs written with Test::More output their results as TAP, which can then either be interpreted by a human or, more usually, run through a TAP parser such as Test::Harness.[5] It is this separation between test program and test result interpreter via a common protocol that has enabled the development of multiple testing modules that can be used together. Additionally, the TAP output can be stored and reinterpreted later, providing a historical record of test results.

Among its features are detailed error messages, functions to test regular expressions, functions to test objects, and functions to test complex data structures.[6] It can be used to compare values, such as a computed value to an expected value, or that a value is within an expected range.[7] The number of tests to be executed is listed in the test script.[8]

Tests that are known to fail under specific conditions or environments can be skipped.[6] This may occur if a system on which the test is executed lacks the capability to execute the tested function, or if the test is written in advance of the code.[7]

The module intercepts standard output from the Perl script to execute the tests.[9]

References

  1. ^ Poe, Curtis. "Test::Most". CPAN.
  2. ^ Granum, Chad (14 March 2014). "Test::More - New Maintainer, Also stop version checking!".
  3. ^ "Test::More". CPAN.
  4. ^ Granum, Chad (9 May 2016). "Test2+Test-Simple released!".
  5. ^ Conway, Damian (2005). Perl Best Practices. O'Reilly Media. ISBN 9780596001735.
  6. ^ a b Tregar, Sam (2002). Writing Perl Modules for CPAN. Apress. ISBN 9781430211525.
  7. ^ a b Cozens, Simon (2005). Advanced Perl Programming. O'Reilly Media. ISBN 9781449378912.
  8. ^ Galbraith, Patrick (2009). Developing Web Applications with Apache, MySQL, Memcached, and Perl. Wiley. ISBN 9780470538326.
  9. ^ Diment, Kieren; Trout, Matt (2009). The Definitive Guide to Catalyst. Apress. ISBN 9781430223665.


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.