HI,
I would like to know, what are all the scenarios under which perl is used for software testing... this will be useful to me

:!:

Dani AI

Generated

asked a very broad question and the thread so far has a few quick replies from , and a practical note from . The answers below expand that starting point into a compact, current-day view of where Perl is actually useful in testing and a short path to get productive.

Common real-world scenarios

  • Unit and regression tests for Perl modules and libraries: the Perl testing ecosystem uses TAP and a family of testing modules; tests are normally written as .t files and run with the standard harness. See and the core Test::More documentation.
  • API / HTTP-level testing and automation: Perl scripts can drive HTTP calls, parse responses and assert behavior (useful for REST endpoints and integration tests). Libraries such as WWW::Mechanize and HTTP clients make this practical.
  • Browser and UI automation: Selenium bindings let Perl drive browsers for end-to-end checks where needed.
  • Isolation, mocking and exception testing: modules exist to stub external services and assert error paths without hitting production systems.
  • Coverage and CI: measure coverage (e.g., Devel::Cover) and output TAP results so CI servers can consume test results.

A simple starter workflow

  1. Decide test level (unit vs integration vs acceptance).
  2. Learn the basic test module (Test::More) and drop tests under t/ so prove/harness tools can run them.
  3. Add mocks for external dependencies, run coverage, and feed TAP results into CI.

Caveats and next steps
Don’t try to force a single tool across all levels; pick the easiest tool for the layer you’re testing. For practical tutorials, start with the perldoc page above and explore modules on MetaCPAN for the specific testing area you need.

Recommended Answers

All 4 Replies

Sounds like homework. So here's the dead obvious one: When the code was written in Perl.

I didn't get the impression it was homework/schoolwork but I have no idea how to answer such a question:

what are all the scenarios under which perl is used for software testing

I don't even know what "testing software" means? Testing it for what?

Hi Giri,

Your question sounds odd of where Perl is used in s/w testing. It all depends on your Application/Testing Environment.

Suppose, your application is generating lots of files into a particular directory and you want to check for a particular string which is present in each and every file without actually opening all the files ( It's a tedious job to open,check for the string and increment the count :rolleyes: )

You can write an automated perl script which opens all the files,search for the string and display the result which can save your lot of effort.
I remember the module Test::Files will do it for you.

If you can find the book Perl Testing: A Developer's Notebook , all your questions can be solved.

HTH,
Kalyan Raj
Hyderabad

how much perl u need to know to get in to testing jobs....i know the basics till functions in perl,is that enough???
-testuser

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.