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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |