34
Lenyct
8y

Telling the boss i'm not writing bullshit assert true test cases because i have ethics

Comments
  • 2
    Is that a thing? Padding the test count by having tests that just assert true? :O
  • 3
    @eldamir

    On one end of the spectrum you have tests which simulate the apocalypse and rebuild civilization, and proceed to assert that the cat at the end of the street will survive all of it.

    On the other end of the spectrum, you have people who test things which can never change due to the constraints of the language (is 1+1 still bigger than zero?), or things which are fairly unlikely to change and shouldn't be tested on their own (the value of a class constant).
  • 0
    @bittersweet

    At my last job I was forced to write a unit test for every possible case. Every function called had to test null and non null for each parameter, everything u could think of. They even had programs that would run to find out what we didn't test.

    The closest thing to a test at my new job is a Word document saying what the result should be for specific data entered by a user. Not necessarily a good practice, but much easier!
  • 1
    Test possible human inputs and those resulting in a monkey using your class. Constants and enums only if you're using them in public APIs or the database.

    This might seem tedious but you'll have some very stable and changeproof code that is easy to get started with.
  • 0
    @eldamir yeah getting all type of flack to make sure my test count is a number not quality of suite,
  • 0
    @Lenyct thats awful :(
  • 0
    a stupid rushed rebase and i lost 2 weeks of work,

    after some git magic with ref log and jira history i fixed it

    https://media1.tenor.com/images/...
Add Comment