Hello Monks,

I am a quality assurance engineer by profession. I have written a few perl scripts that have reduced my manual testing time considerably. I want to extend it by creating an automation suite that would kick off and validate all my test cases and provide me a summary of which test passed or failed and why.

CPAN lists great amount of testing modules and I had picked up a copy of Perl Testing: A Developer's Notebook to see how I can use these modules to my advantage.

The book was great and the examples were explained well. However, they all showed how to use module to test the perl code.

In my case the application I have to test is a backend application written in java. I will give a small example of what I have to test to make things clear:

I have an application where one of the services is a FTP Service. Core functionality of this service is to get file from remote location to local server. There are 30 different properties for this service (to make it highly configurable) that I have to test. For example:

- To ensure FTP service only picks file with specific naming convention from remote location. The naming convention is specified as part of a property value

- To validate FTP service renames the file with specific prefix on local server. The prefix is picked from a property value.

- A property whose value is either LIFO or FIFO which ensures FTP service picks the most recently created file (LIFO) or the oldest file (FIFO).

- Validate entries of the file in MySQL database

etc ... etc ...

I was planning to write one package script which would contain all my reusable code and then multiple perl scripts for each test (calling it "001_ftp_test.t", "002_ftp_test.t" ...) which would use my package script and finally a master script that would execute either all or specific tests as required. The individual scripts would include testing of all positive and negative scenarios for one particular test case only (to make things easier to maintain in the long run)

My question is how do I use modules like Test::Harness, Test::Builder or Test::More to my advantage. Are these modules only for testing perl code? Should I not use any modules and just write stand-alone perl scripts and then run them as per requirements? Should I create TAP output from my perl scripts in order to use these modules?

Please leave a comment if any part of the question is not clear and I will update the question to fill the gaps. I look forward to your guidance.

Thanks in advance
Jaypal


In reply to Automation using perl by jaypal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.