Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

System testing a WWW transaction application

by dragonchild (Archbishop)
on Jul 20, 2002 at 23:38 UTC ( #183702=perlquestion: print w/replies, xml ) Need Help??

dragonchild has asked for the wisdom of the Perl Monks concerning the following question:

At my new position, we power these WWW treansaction systems. It's a huge state machine, essentially. It's all written in Perl/Apache. (Don't say anything about CGI::Application or nothing. It's a 4yr old application.)

Now, we need to be able to do systematic system testing, preferably black-box testing. Are there any ways people have tested full WWW applications without having to build hooks into the code or manually following every path?

------
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.

  • Comment on System testing a WWW transaction application

Replies are listed 'Best First'.
Re: System testing a WWW transaction application
by dws (Chancellor) on Jul 20, 2002 at 23:54 UTC
    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?

      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.

      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.
Re: System testing a WWW transaction application
by FoxtrotUniform (Prior) on Jul 20, 2002 at 23:56 UTC

    I'd expect you to find cURL useful, at least for the "poking at the interface" bit.

    Why are you so interested in black-box testing? In my experience, the programmers have a fair idea of which bits of the system are robust and which could use some work, so building tests to fit the code is quite profitable.

    --
    The hell with paco, vote for Erudil!
    :wq

      Black-box testing is a necessity for verifying that applications, as a whole, work. The client uses your application as a black-box. Hence, you should, at least, once, try your application as a black-box prior to letting your client have it.

      cURL looks interesting. Do you have anywhere that shows how it's used? The site didn't seem to have stuff about black-box testing WWW interfaces from the way it's displayed on the screen.

      ------
      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: System testing a WWW transaction application
by ignatz (Vicar) on Jul 21, 2002 at 03:57 UTC
    The most kick ass testing of a web application that I have ever seen was with a commercial tool from seque solutions called SilkTest. In seconds that sucka would dig up little bugs out of the most hidden of nooks and crannies that there was no way in hell that I would have found on my own. Worth every penny in my book.
    ()-()
     \"/
      `                                                     
    
Re: System testing a WWW transaction application
by IlyaM (Parson) on Jul 24, 2002 at 12:00 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2022-05-22 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (81 votes). Check out past polls.

    Notices?