#Test-classes best practice
23 messages · Page 1 of 1 (latest)
Do you keep updating it for every new iteration of the program or do you just ignore it and do a full rework at the end
What exactly do you mean by “test class”
Oh hold up let me look to the englisch term I just translated it from the German term
Looked it up it says either test class or the term you probably want is unit test
So just some code with Test cases however you want to call it
I don't
but I'm a big hater of tests in general
if it's actually hard and complex I write tests for the actual logic
Perfect
Then ima leave it fs
I hate it too💀
It's not even about just hating it but I don't see the point in most tests
I write tests that ensure the behavior is what I want it to be. This way if I change the implementation the tests will still be valid since the behavior likely isn’t going to change
Yeah right but in this stage I’m still changing around a lot in the program that’s why I’m not sure how much sense it makes in an early stage
Do you know how a set part of your code will behave? X goes in Y comes out? You can test that
Check that when X goes in that Y comes out, that’s a test
If your code base is so unstable that you can’t pin down anything that’s consistently going to be X->Y then maybe you don’t have a clear enough picture of what you’re trying to build
I think I’ve understood the point from you and rob, I basically have X and Y already but basically all the additional attributes that are going into the main algorithm are still changing so I’ll stick to manual tests for now
But thank you guys I was familiar with the theory behind it but I was just wondering wether and/or how people actually implement it, also watched some videos additionally
I am New (A Beginner), I Hope You Can Help Me Run My Project
Create your own post and if someone knows how you help they will
Just about the tests, IMO it only makes sense, when you work with multiple departments or a bigger group on one codebase.
If you build directly modular and entity based (like with classes e.g.) you should test each part individually, so... why writing a test for that? xD After you tested it, it wont be changed. if you run into an error, its not properly entity based and you need to fine tune the architecture.
I think most groups(i include companys in this) use tests, because the project started to be coded before the proper architecture was thought about.
So in short, make a good ground work/build a good base and (most) tests unnecessary.
(also implementing a proper exception ahndeling will do the trick too xD)