Closed johanlahti closed 8 years ago
One conclusion from the research ( including @peterahlstrom's ) is that integration testing makes most sense in our case since our plugins are dependent on so many other things and are mostly visual components (GUI). Some things could possibly be mocked up, and in some cases can be tested isolated independent of the frameworks (e.g. smap, Leaflet) – and should then be implemented as unit tests instead. Especially while developing new plugins a more test-driven-like development should be encouraged.
Next step (if we want to…) will be a continuous integration environment, which @tyskan previously had setup for us using Drone.io + GitHub. Now, the tests could also be part of this flow chain :D .
To setup a new test for you plugin:
npm install
to get all the mocha
and casperjs
stuff installednode_modules/.bin/mocha-casperjs test/{pluginName}.js
OR run gulp test
(after modifying the gulpfile.js
)
We should start to use automized testing, at least unit testing for our plugins. Ideally, this should be integrated with our gulp script.