I think I might be getting the concept wrong or not thinking about something correctly. I'm looking for a way to connect to db, and then run a selenium test (in phantomjs) for every row of a table. The test is to check for broken images on a bespoke CMS, and could be applied to any CMS.
I basically want to run an acceptance test for every page (of a specific type) by loading their IDs from the db and then running a separate test for each ID.
This is what I have so far:
$I = new WebGuy($scenario);
$results = $I->getArrayFromDB('talkthrough', '`key`', array());
foreach ($results as $r) {
$I->wantTo('Check helpfile '.$r['key'].'for broken images');
$I->amOnPage('/talkThrough.php?id='.$r['key']);
$I->seeAllImages();
}
This works to some extent in that it executes until the first failure (because it is running as 1 test with many assertions).
How do I make this run as individual tests?
wantTo()
calls don't create separate tests I've found. – Weitman