TAGS :Viewed: 5 - Published at: a few seconds ago

[ How can I run individual test cases against a locally running Selenium server? ]

I found a project called Selenium Zoetrope that runs PHPUnit tests on a Selenium server and records video of the test using ffmpeg (see this blog post for more details). I'd like to adapt the scripts to work with test cases saved from the Selenium IDE instead. To get individual videos per test case, rather than one video containing all test cases, is there a Selenium command line for running individual test cases exported from the Selenium IDE?

The Selenium command line examples I've found all start up a server and run the full test suite. Can I instead run an individual test case against an already running server instance, similar to what construct and run do in Zoetrope?

Or is there another way to capture video of individual test cases?

Answer 1

If you export the tests from the Selenium IDE to another format such as PHP, you can then use that language's test runner to execute a specific test. In the case of PHP, if you export your Selenium IDE test as test1.php, you can run just that specific test by executing phpunit test1 test1.php in the test file's directory (see here for more info on phpunit).