---
title: "Comment by Agnius Vasiliauskas on \"[JavaScript] Why do we need tests?\" | Hashnode"
description: "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"
url: "https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d020fe9c58d616927458ebd"
---

[Discussion](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d)

Comment [\[JavaScript\] Why do we need tests?](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d)

[Agnius Vasiliauskas](https://hashnode.com/@AgniusVasiliauskas)

[Jun 13, 2019](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d020fe9c58d616927458ebd)

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_.

[Amrit Pandey](https://hashnode.com/@ap4tt)

[Jun 17, 2019](https://hashnode.com/posts/javascript-why-do-we-need-tests/5d014024ae52bd0a17b2a97d/comment/5d020fe9c58d616927458ebd#reply-5d0738d68dc39fa061f6219d)

Thanks for this awesome comment.

I have noted down this fact and will come back to it as I advance my knowledge in testing.
