4 ms·
As an example, the current "application" I'm working on is basically a client-side implementation of an Excel spreadsheet written using Backbone.js. The idea of
by davemo 15y ago
As an example, the current "application" I'm working on is basically a client-side implementation of an Excel spreadsheet written using Backbone.js. The idea of "maximally realistic tests" in this project involve manually comparing the calculations I've implemented in JavaScript to see if they match the output in the Excel sheet.
So, we've got great isolation tests that cover the UI functionality in the webapp and some simple calculation tests that verify behaviour for equations by providing the same inputs as the spreadsheet and verifying the output is the same (in this case, that means copy/pasting excel table values into the .toBe(expected) part of my specs).
I'm wondering, in this case how would I write remote full-stack or local full-stack tests?
- searls 15y agoAll things being equal, I'd start with just one full-stack test that used a typical existing instance of a spreadsheet as reference for its test data, then I'd automate a browser to fill in all the inputs into your new single-page app, and I'd finally assert that the computations match the results on the reference spreadsheet. That way, the full-stack test treats the new application as a black box and validates that the new implementation is still working like the old one (at least in the cases of whatever reference spreadsheets you throw at it).