Mutations and infinite loops

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Mutations and infinite loops

Post by Ambush Commander »

I was thinking about this the other day... so here it is: What if a mutation creates an infinite loop? How would you make sure the mutation doesn't run too long?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Re: Mutations and infinite loops

Post by Maugrim_The_Reaper »

In Mutation Testing?

For PHPMutagen at least it, when finished (currently has a nasty maximum process count bug, let alone infinite loops from running it!), will run the tests/spec suite for each mutation in a new PHP process which will carry an optional time limit for a) overall execution, and b) each executed test. Even without these the running process will terminate once the maximum time limit set in php.ini is reached. PHPMutagen would take the lack of a passing reponse as an escaped Mutant and report it from the parent process.
Post Reply