pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
Res facta quae tamen fingi potuit ([personal profile] pauamma) wrote in [site community profile] dw_dev2015-02-17 07:14 pm
Entry tags:

Question thread #28

It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
quartzpebble: (INTERNET)

[personal profile] quartzpebble 2015-03-02 05:23 am (UTC)(link)
What's DW's approach to automated testing? I see that there are tests in dw-free/t/. Does each test file correspond to a function? A module? Are there conventions we use? Where do I start if I want to add tests? Are there any recommended resources for writing tests in Perl?

I ask because I've been learning about writing tests for other projects I've been working on (in Python) and I'm working on this bug: https://github.com/dreamwidth/dw-free/issues/659 and planning to pick up some more, and I like tests that tell me I haven't broken things.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2015-03-02 05:30 am (UTC)(link)

The test coverage is spotty, and we don't make "run the tests" part of pre-pull-request testing because running them can corrupt the DB on your development machine. There's been some work done on it, but not a whole lot, so anything you wanted to do would be awesome!

(Anonymous) 2015-03-02 06:46 am (UTC)(link)
"Want to do things with that", yes, "currently have the knowledge to", no. So, general question--any good testing-in-Perl resources?
quartzpebble: (i killed elmo)

[personal profile] quartzpebble 2015-03-02 06:47 am (UTC)(link)
Whoops, that was me.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2015-03-02 06:52 am (UTC)(link)

I don't know much about it myself, but a quick Google search turns up this as a start. (I believe we do use Test::More.)