bslatkin / dpxdt

Make continuous deployment safe by comparing before and after webpage screenshots for each release. Depicted shows when any visual, perceptual differences are found. This is the ultimate, automated end-to-end test.
https://dpxdt-test.appspot.com
Apache License 2.0
1.44k stars 124 forks source link

Option to run CasperJS tests? #122

Open danvk opened 9 years ago

danvk commented 9 years ago

Local dpxdt has pretty nice tools for setting up a test environment (i.e. creating & population a database, starting the server), waiting for it to be ready and then tearing it down when it's done.

dpxdt makes it really easy to capture screenshots while the test environment is around.

But there are some tests that are better written using assertions than diffing pixels. For example, I'm adding a screenshot that's mostly about verifying that a few numbers are what we expect them to be. The numbers are captured in the screenshot, but the test would be more precise (less brittle) and more explicit if I asserted that that numbers were what I expected. CasperJS has a really nice testing mode for this.

Since dpxdt does the setup/teardown stuff so well, it would be convenient if I could run CasperJS tests while the test environment was around. In the YAML file, this might look something like:

tests:
  - name: screenshot
    url: http://localhost:1234/

  - name: numbers-test
    casperScript: path/to/casper-test.js

Questions: