Re: question regarding Reflection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manish Marathe wrote:
Hello All,

I am developing a unit test generator for PHP. The generated tests would be
PHPUnit2 compatible and I will be using the Reflection API to generate the
tests. The tests would be generated only for classes and written on PHP
5.0.3 compatible.

My question is to use the Reflection API, I need to import the original
class for which I am generating tests. For example to generate a tests for
class Company which is in Company.php:

include_once('company.php');

$c = new ReflectionClass('Company');

If I have to generate test for many classes at once, it would be foolish to
have them included in my file on the runtime. Am I understanding it

a complex app can have 100's of classes, not usually all loaded at once but still.

the upper limit is depends on how much memory your generation process is allowed
to grow to, how often you [need to] run it, how process-intensive it is to run
the generation and how big your iron is.

you might consider using forking in a master process and letting a series of
child processes each handle a chunk of all the classes to generate tests for,
basically running in parallel.

I don't see how you can avoid loading many classes 'at once', why  do you
think this is foolish [by definition]?

hth.

correctly ?

Thank you for your help

Manish Marathe
SpikeSource, Inc.
http://developer.spikesource.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux