Any serious devs here? How long are your unit tests?

Any serious devs here? How long are your unit tests?

I run a per function unit test on the backend
Run JavaScript tests in node
Then I boot a live instance and test everything with selenium on all browsers
Finally I run some tests on the dB to ensure all results from the previous tests have generated the correct data.

This is all automated of course but it takes around 3-5 hours to complete. So I run tests on what I am working on through the day then do a full build tests over night.

Is this too much? Thoughts?

I'm an intern at a tech company, so I haven't had any experience writing unit tests, nor how long they should go for, but it is always best to do a completely comprehensive test to cover all of your bases.

>serious devs
>javascript

Did you have to ruin the thread with your nigger shit?

javascript is perfectly fine for testing other shit.

OP, at my company we use qunit to test against our rest api. Running the full suite of tests takes about 3hrs, but we don't run the full suite on every commit, just before every prod release.

>Serious devs
>JS

Im done with this sites.

a serious dev uses whatever tool allows him to do the required work in the most effective way, not just obey dogmatic bullshit he heard on an imageboard.

You're right, faggot. I'm so sorry for insulting your javascript.

I know I am right.

Yea. You know you are.

Is this for your personal website, or for a large corporation? If its for a corporation, it sounds like good practice.

>around 3-5 hours to complete
What? Even for a huge project, your tests should not be taking that long. Half hour, tops. Most unit tests should be done within minutes, if not seconds. If it takes more than an hour to run tests and deploy a build, something is horribly wrong.

>5hrs for unit tests
fucking why, 'serious devs' (such as myself) are running continuous testing which literally continually tests the code as you type so you can see instantly when something breaks that shouldnt have
javascript testing lomeyo

...

ebin

>No tests to see if previous tests have created any incorrect data beyond the correct data

Pleb/10

>Any serious devs here?
Yeah
>How long are your unit tests?
lmao

JavaScript on the backed. As a frontend monkey, I'm lmaoing @ your life

Your end to end testing should cover your database state, business logic and front end (UI). You shouldn't need to do them separately.

I'd split your tests into only unit tests, functional (behavioral) tests, stress tests, soak testing and end to end testing. When they're broken down like that you can compose and use tests only when you need them.

You should aim to get all of your testing done asap. I can run all of my tests in less than 3 seconds. They all run in parallel on the dev cluster.

Im a serious dev and i dont test at all.

>node and js
>serious developer

The last job I had didn't test either, and I didn't give a shit.

pretty big monolith app (150k LOC on top of the framework), all tests take at the moment 9 minutes to run including all the unit tests and BDD tests. They run every time a PR is submitted which is ~15minutes or so so they never get in the way

>3-5 hours
Nigga what are you doing. Testing should be anywhere between 1 minute - 20 minutes.

>serious devs
>acceptance test takes 5 hours

>Sup Forums likes lisp
>Sup Forums doesn't like js
I never truly understood why

Serious dev here.
There are no unit tests.
Everything works.
No one gives a fuck.