duckduckgo-documentation icon indicating copy to clipboard operation
duckduckgo-documentation copied to clipboard

Testing pages (https://duck.co/duckduckhack/test_files) is too vague

Open mintsoft opened this issue 11 years ago • 2 comments
trafficstars

Hey,

IMO, the testing page could do with explaining that the text, html and heading outputs need to be tested as a whole. Currently this isn't obvious and I can't actually find an example in the docs of the html or headings being tested!

Thanks,

mintsoft avatar Apr 18 '14 10:04 mintsoft

:+1:

This page implies that Spice IA's can only be tested for correct triggering. Not sure if that's true.

Also, I'd say that the Goodie test example could use improvement: it's coupled directly to the exact HTML output. This means that the tests will fail for inconsequential formatting changes. Instead, the tests should reflect the spec, or the stories of the feature.

dogweather avatar Apr 09 '15 08:04 dogweather

@dogweather AFAIK only triggers can be tested on Spices; there's no JS testing available atm. WRT to the goodies, the output can be pattern matched with regex etc so it's plausible to ensure that they key-content is present in the output, or alternatively the range of values are correct etc.

With Structured answers (and hopefully templates @moollaza ?) the output from the goodie will be more separate from the presentation so we can be more precise with the tests!

mintsoft avatar Apr 09 '15 09:04 mintsoft