chenglou / node-huxley

Codeless front-end testing.
MIT License
361 stars 29 forks source link

Record also on url change and even to different domains. #7

Closed simonweil closed 2 years ago

simonweil commented 11 years ago

I would like to check when sites I have links to change, and see what changed.

chenglou commented 11 years ago

Hey, this is debated on the original Huxley too. It seems like somewhat of a technical challenge, but that aside, what's your use-case for it? Usually the tasks are separated as such that you won't need to test two behaviors together. Changing link seems like two behaviors.

simonweil commented 11 years ago

I check outgoing links from my site to track changes on affiliate sites. Currently I need to do it manually, using huxley can automate the process for me.

chenglou commented 11 years ago

I see. The problem is that even with the option in place, you have no control over the affiliate site's visual, and when Huxley takes a final screenshot it naturally causes you problem whenever their site's look changes (unless you have 100% control over it). It's not an automation tool more than a unit testing one.

I might add the option to track records on page switching, though I'm unsure whether this is right. Just like how the example's cut into two tasks rather than lumped together, I think this library has a responsibility of guiding people to do testing correctly and reduce their mental load rather than giving too many options with multiple cli flags.

That being said, I'm leaving this issue open and will receive further feedback from everyone stumbling upon it. Thanks!

simonweil commented 11 years ago

Another thing is recording also on redirects on the same domain. My site sadly isn't a one page application (yet) and I'd love to use Huxley for integration testing on it rather than manually writing the test as I do now.

chenglou commented 11 years ago

That's reasonable, but why don't you separate your component into tasks such that you don't need to record the redirection part?

simonweil commented 11 years ago

To make sure links are not broken, something that does happen sometimes and I have no control over it.

chenglou commented 11 years ago

True… That'll be tricky though, because as far as I know there's no page change event in Selenium, so you'll have to place a meaningful pause between your click and the next action, which cannot be predicted.

I'll see.

simonweil commented 11 years ago

Thank you I appreciate that very much, Huxley is very impressive!

chenglou commented 11 years ago

You're welcome =). Glad to see people using it!

simonweil commented 2 years ago

Abandoned years ago...