views:

154

answers:

1

I'm working on large project in PHP and I'm running phpundercontrol with PHPUnit for my unit tests. I would like to use Selenium RC for running acceptance tests. Unfortunately the only person I have left to write tests only knows Python. Can Selenium tests written in Python be integrated into PHPUnit?

Thanks!

A: 

The only thing that comes to my mind is running them through the shell. It would be:

<?php
$output = shell_exec('python testScript.py');
echo $output;
?>

It's not too integrated with phpunit, but once you get the output in a variable ($output), you can then parse the text inside it to see if you have "E" or "." ("E" states for errors in pyunit and "." states for pass).

This is the best thing I could think of, hope it helps.

Santi