facebookarchive / huxley

A testing system for catching visual regressions in Web applications.
Apache License 2.0
4.07k stars 286 forks source link

Record new tests without re-recording old ones #48

Open SimplGy opened 10 years ago

SimplGy commented 10 years ago

Is there a way to record a new test without re-recording old ones?

If I add a test to Huxleyfile.json, it seems like I have to re-record all of the tests.

I have been working around this by:

Is there a huxlified way to do this?

chenglou commented 10 years ago

Cross-posting from https://github.com/chenglou/node-huxley/issues/30 The node version has a jasmine-like xname option to temporarily disable some tests. I'm also considering dropping it and opt instead for >name instead, which allows you to run a single test.

SimplGy commented 10 years ago

Below is the part I didn't know. Seems like the best setup would use one huxleyfile per component, and glob them all into one update run. Then you could record one ui component at a time, which is the common case. Thanks for referencing #30!

Maybe I should make this stand out more in hux -h, but you pass the folders containing the huxleyfiles, aka without the /Huxleyfile.json part. Btw, you can also use globs. And multiple globs =). Huxley will dedupe the paths correctly.

chenglou commented 10 years ago

You're welcome =). It's written in the best practices here.

SimplGy commented 10 years ago

The docs recommend dedicated urls and single component testing. It would be clearer to describe that you can (and should) have multiple huxleyfiles, in that same section, otherwise you run into issue #48 :)

The documentation section you referenced (sumarized):

  • Create a dedicated test URL for Huxley to hit that uses mocking.
  • Test a small unit of functionality.