softwerkskammer / Agora

Die Software für die Plattform der Softwerkskammer
Other
55 stars 59 forks source link

Mutation Testing #1144

Open NicoleRauch opened 7 years ago

NicoleRauch commented 7 years ago

Mutation testing is supposed to identify redundant tests and unchecked areas of the code. I would like to experiment with it and see whether this helps us - and also to see how good our tests actually are. The first step would be to try out different mutation testing libraries and to identify a functional and suitable one. The second (optional) step would be to discover poorly tested areas in the codebase and to improve their coverage.

simondel commented 7 years ago

Perhaps we can help you out using Stryker! Are you still looking to implement this?

leider commented 7 years ago

Sure. Just shout if you need help setting things up here!

simondel commented 7 years ago

Cool! We'll create a PR after we release a new version of Stryker because then we'll support parsing your karma.config.

leider commented 7 years ago

Most of our tests are serverside nodejs with mocha.

Am 29.12.2016 um 14:50 schrieb Simon de Lang notifications@github.com:

Cool! We'll create a PR after we release a new version of Stryker because then we'll support parsing your karma.config.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

avassem85 commented 7 years ago

I'm trying to use stryker on your project (master branch). After following the setup instruction I and npm test I get 13 errors, (the first 3 are):

1) the gallery repository on real files metadata for images provides exif data for a given image:
     Uncaught Error: spawn convert ENOENT
      at exports._errnoException (util.js:1012:11)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
      at onErrorNT (internal/child_process.js:348:16)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  2) the gallery repository on real files stores an image in the file system:
     Uncaught Error: spawn convert ENOENT
      at exports._errnoException (util.js:1012:11)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
      at onErrorNT (internal/child_process.js:348:16)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  3) the gallery repository on real files retrieval of images provides the original image when no width is provided:
     Uncaught Error: spawn convert ENOENT
      at exports._errnoException (util.js:1012:11)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
      at onErrorNT (internal/child_process.js:348:16)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)
NicoleRauch commented 7 years ago

@avassem85 These tests are quite integrative, I fear; they need imagemagick to be installed. If you don't want to install that, then please ignore the tests (change describe to xdescribe and ìttoxit`).

leider commented 7 years ago

@avassem85 Can you provide more details:

Nonetheless you can still run all the others by ignoring the failing tests. As @NicoleRauch already said the tests are infrastructure heavy :)