Subscribe by Email

Thursday, October 25, 2012

What is Perl Testing?

Various testing methodologies have become a corner stone for many of the development processes and PERL testing is one such testing methodology. 

"Perl testing is one such testing that is highly involved with the creation of automated test suites".

The creation of automated test suites with regard to the perl projects is assisted by around 400 testing and quality modules which are now available on the CPAN.
Now you must be thinking why only automated test suites in perl? 
The answer is that the with an automated test suite the developers as well as the project managers get a sense of confidence in the ability of the code that it can very well carry out a specification. 

What is Perl Testing?

- Perl development ethos has always viewed software testing as its central and critical part since years. 
- Gradually, a testing protocol by the name of TAP or ‘test anything protocol’ was set up for the perl in the year of 1987. 
- This TAP protocol is now available for so many languages. 
- Many of the test modules on CPAN like 100s make use of this TAP protocol. 
With the help of this protocol it has been made possible to enable the following aspects:
  1. Testing of data base queries
  2. Testing of objects
  3. Testing of web sites and so on.
- Around 250,000 tests have been developed for the core Perl language plus there are a same number of tests for the libraries that are associated with it. 
There is one more advantage of the automated test suites which is that the additions are done to the code base as the changes in functional requirements are experienced. 
- But, while making the additions, re-factoring is required so as to avoid duplication. 
- Since, if there is enough code coverage the issues will automatically be highlighted by the test suite and then it becomes fairly easy to spot the changes that occur in the knock on effects of code. 
- The duty of the code coverage is to determine how much of the code has been tested since the execution of the test suite. 
- This metric however can be obtained from the developer and also the branches and sections of the code that are not being tested can also be reported. 
- Testers can combine the testing modules that are most frequently used and thus it serves a good starting point. 
- So, for the cases in which testing specific functionality is required, one only needs to add specific testing modules to the test.
- Perl has always recognized testing as a part of its culture. 
- With the TAP protocol, the communication between a test harness and several unit tests has been made possible. 
- The TAP producers can make communication regarding the test results to the testing harness in a way that is language agnostic. 
- Earlier the parser and producers were available for only this platform but now they are available for a variety of platforms. 
- The responsibility for the following purposes is taken up by the test anything web site:
  1. Development of TAP
  2. Standardization of TAP
  3. Writing of test consumers
  4. Writing of test producers
  5. Evangelization of the language and so on.
- In many other testing methodologies, writing the tests and verifying them seems like to be a daunting task but it is pretty easy with the perl test facilities. 
- It is not always necessary that a large perl project must have an automated test suite. 

No comments:

Facebook activity