Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: System testing a WWW transaction application

by dws (Chancellor)
on Jul 20, 2002 at 23:54 UTC ( [id://183704]=note: print w/replies, xml ) Need Help??


in reply to System testing a WWW transaction application

It's a 4yr old application ... Now, we need to be able to do systematic system testing ... without having to build hooks into the code or manually following every path

Uh oh. Four years into an applications lifecycle is a bit late to discover system testing. Are there unit tests for subsystems, or are you trying to avoid having to restructure the code to make unit tests work?

My preference is to start with unit testing each subsystem, using mock objects as necessary to isolate subsystems from each other. If you wait until everything is assembled until trying to test, the tests are harder to write, since they have to set up and tear down a known environment (e.g., resetting the database configuration to a fixed starting point).

chromatic has a good article on using mock objects to test. See A Test::MockObject Illustrated Example.

Can you say more about the reluctance to build "hooks" into the existing code?

  • Comment on Re: System testing a WWW transaction application

Replies are listed 'Best First'.
Re: Re: System testing a WWW transaction application
by dragonchild (Archbishop) on Jul 21, 2002 at 01:41 UTC
    I've been here for less than 3 months and have discovered that I have absolutely no idea as to how to tell the QA people how to test my stuff. There are no standardized tests at all.

    The system is poorly designed and cannot be changed quickly. Hence, we can only work with external tests. Plus, I'd prefer external testing, anyways.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Re: Re: System testing a WWW transaction application
by IlyaM (Parson) on Jul 24, 2002 at 12:10 UTC
    There are some difference between FunctionalTests (aka AcceptanceTests) and UnitTests. Idea of unit tests is that they are written by programmer and they test isolated pieces of program while functional tests are implemented by other party (for example QA stuff) and they test whole application. It is important difference!

    The purpose of functional and unit tests is different and they are implemented by different people. Obviously they need different tools. Test::MockObject is useful in unit testing but it is wrong tool for functional testing (and this is what about dragonchild is asking).

    --
    Ilya Martynov (http://martynov.org/)

      Functional Tests are a different beast than Unit Tests, though if you don't have effective Unit Testing, jumping in to Functional (or Acceptance) Testing is like catching rain in buckets when you should have patched the holes in the roof first.
        I'd say they are quite independant. Ideally you need both of them but in reallity it is better to have some tests rather not having them at all.

        If I were dragonchild I would teach QA-staff to use some non-programmer friendly tool (<shameless plug>HTTP::WebTest</shameless plug>) and ask them to start writting functional tests. Conserning unit tests: when you have big pile of cra^H^Hcode it is hard to implement missing unit tests at once. In most cases you have no time and/or motivation to do this work. However it is not hard and IMHO sufficient to start writting unit tests for all new or changed code.

        --
        Ilya Martynov (http://martynov.org/)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://183704]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found