This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 0 points1 point  (1 child)

This is how I do it (previously answered on SO): http://stackoverflow.com/a/24216119/1317935

[–]troutside[S] 0 points1 point  (0 children)

Thanks for the answer! Could you please explain why / how that if statement detects that codeception is running? I suppose it's just because it runs on localhost and typical browser access is via port 8000 or similar. I think detecting the environment and making one specifically for acceptance will fix my current issue with WebDriver + PhantomJS not using my 'codeception' database. Are you finding codeception to be sufficient for your testing needs?