List Info

Thread: PHPT and SimpleTest




PHPT and SimpleTest
country flaguser name
United States
2008-02-13 14:45:13
Is there any way to run *.phpt files inside of SimpleTest?
Travis
mentioned PHPT <http://phpt.info/>
before, but it seems like the code is
still flaky (alpha-stability) and I couldn't find any
user-friendly
documentation or instructions on how to fit it into
SimpleTest.
-- 
 Edward Z. Yang                        GnuPG: 0x869C48DA
 HTML Purifier <http://htmlpurifier.org&g
t; Anti-XSS Filter
 [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Simpletest-support mailing list
Simpletest-supportlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simp
letest-support

Re: PHPT and SimpleTest
country flaguser name
United States
2008-02-13 16:32:32
On Feb 13, 2008, at 2:45 PM, Edward Z. Yang wrote:

> Is there any way to run *.phpt files inside of
SimpleTest? Travis
> mentioned PHPT <http://phpt.info/>
before, but it seems like the  
> code is
> still flaky (alpha-stability) and I couldn't find any
user-friendly
> documentation or instructions on how to fit it into
SimpleTest.


The PHPT code itself would be the best documentation for
that.  Check  
out the PHPT_Controller_CLI to see how it runs the tests.  

Essentially, you need to create a Case object (which can be
done via  
PHPT_Case_Parser) if you just have one file (a Suite if
there's  
multiple - see PHPT_Suite_Factory for that), then call run()
and  
supply it with an object implementing PHPT_Reporter.  The  
PHPT_Reporter based class is the only custom code you'll
need to  
proxy results back to SimpleTest.  Shouldn't be more than a
half hour  
project.

As to the the alpha state of PHPT, that has been done just
to allow  
myself the option of changing the API if necessary.  So far,
I've yet  
to change anything though and have been using a build from
SVN for a  
few months now with only one issue that actually caused a
bug.   
Compared to some "stable" software, testing and
otherwise, out there  
in PHP-land, I would consider PHPT pretty solid, even in its
alpha  
state.

-T

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Simpletest-support mailing list
Simpletest-supportlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simp
letest-support

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )