28 likes
·
740 reads
5 comments
Nice article. I would like to add that not every thing can be unit-tested with a test automation framework. At least, not practically- if your single test would run for a several days. Consider this, that you are building software which categorizes movies by genre. You can't write a unit test for just a several movies and if they are correctly categorized - hope that your algorithm predicts genre well. It's not working like so. Typically you would want to calculate false positives and false negatives for a genre detection of let's say 2'000 movies. If you will get these false positives / false negatives ratios as a small numbers from this movie set - only then you can conclude that your algo works as expected and change X in the program hasn't broke the classification quality. The problem is that classifying such huge amount of movies requires a long time. So it's reasonable to put such classification task in some sort of CRON scheduler which would be run regularly until it finishes classifying a movie test set. Only then you can calculate FP/FN ratios and say if your test has passed or not. What I'm trying to expose here - that long-running tests may not be suitable for a automation frameworks.
Thanks for this awesome comment.
I have noted down this fact and will come back to it as I advance my knowledge in testing.
Which one is the best to use for writing tests for JavaScript & Vue.js?
If you are beginning Mocha is simple and good both for front-end and back-end. Vue-CLI also have built in option for Unit Testing in Mocha.
But I've heard great things about Karma.js for front-end. Source:
Ah! Thanks for the reference.