teamcfadvance / CFSelenium

A native Selenium WebDriver binding for ColdFusion
Apache License 2.0
81 stars 32 forks source link

Server Start in cfselenium #2

Closed marcesher closed 13 years ago

marcesher commented 13 years ago

bob, these changes add a new server.cfc which handles stopping/starting the selenium RC as well as a base CFSeleniumTestCase which will do this automatically.

One thing: I screwed up the readme formatting, no idea what's going on with it as I am completely unfamiliar with markdown. basically, the linebreaks are gone. I"ll leave it up to you to shed light and teach me what I'm doing wrong.

bobsilverberg commented 13 years ago

Cool stuff, Marc. I wasn't sure about the changes you made to two of the tests. I've added comments to the files. Can you comment?

marcesher commented 13 years ago

I removed them b/c they were not necessary. the serverStop in the afterTests() function ensures that the browsers are closed -- at least, it did in my end.

In addition, I've never been a fan of assertions in tearDown.

but if you want to add them back, it's all good dog!

bobsilverberg commented 13 years ago

Hmm. The assertion in teardown was just there so I could (attempt) to see if the call to selenium.stop() actually worked. I think the seleniumStartupTest was there to prove to me, visually, that CFSelenium could in fact start and stop various browsers. So without the teardown() I don't get that confirmation. This doesn't really help in an automated setting, but it was nice for me during development to be able to confirm the behaviour. So I think it makes sense to leave it there.

On the other hand it does make sense to remove it from the VTT... test as there's only one test in there so, as you say, the browser would be stopped anyway.

marcesher commented 13 years ago

sending a new one