@freemo @tmy

> let along the need for CI that includes both benchmarks and tests.

CI and benchmarking are useful in some contexts (but you will get more mileage per line of test code and you will write fewer tests that don't matter if you just write tests that hit the full stack, and if it's hard to get 99% coverage doing that, then your code is too convoluted), but they're not obscure secrets. Anything Github has badges for can be taken to be common knowledge.

@p

99% coverage isnt really needed. 90% coverage is already more than enough in most cases. As long as you have reasonable coverage then its good by me.

@tmy

@freemo @tmy This project has 0% coverage because it is a thin dab of glue between some very mature components but 99% coverage isn't even hard. It's only a pain when you're doing unit tests, and the thing that you actually want to test is whether the external interface behaves as advertised.
Follow

@p

If you have 90% coverage of your component as an integration instead of a unit test that wouldnt be horrific either. Not complete but at least its minimal effort.

But if you have 0% coverage across the board... well its your funeral, especially if you want this to be adopted and developed into the future.

Either way like I said my intention was just toa sk what you had in terms of coverage/benchmarks. Only reason i am defending my perspective at all is because you , as usual, got condescending.

Personally i dont find the conversation useful at this point. The answer is no you have no benchmarks, and no tests. I suggest against it.. good luck, and thanks for the effort.

@tmy

@freemo @tmy

There is more code in heaven and earth than can be produced by your methodology.

> if you have 0% coverage across the board... well its your funeral

Assume I've done this before and that, like I said, this is a ruthlessly simple piece of code:

awk 'NF && $0 !~ /^[ \t]*#/{l++;c += length($0)}END{print l, c}' bin/* config.ru lib/webvac.rb
311 7089

311 lines. The README is nearly 5kB, doc/LICENSE is 33kB. The license alone is five times the size of the code.

"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." --:tonyhoare:

(I didn't unit-test that awk script, either.)

Call me back when you can do something besides quote HN at me, dude, I don't even need to read the rest.

@p

These would be more suited for integration tests then, not unit tests then to be clear. I wouldnt mind personally if unit tests were absent as there are no units to test in that case. But integration testing... yea still a good idea.

@tmy

@freemo @tmy I have a great way to test it: run it on FSE. Since it's handling data that is backed up anyway and FSE is high-traffic and if uploads stop working for a bit, nobody loses any money and nobody dies, I get exhaustive testing for *free*.

@p

The point of integration tests isnt because you cant test it by hand. Its so other developers who modify things dont have to do the same test you would do every single time they make a modification. To be able to have the automated.

Not every developer is going to run their own instance, not ever developer is ok using a live production server as a test bed, not every developer is going to want to test every single aspect by hand every time they make a mistake, not ever developer will even know when a change might warrant one particular test over the other.

So if you really think that fills the same need as integration testing, then it seems clear to me at this point you dont really understand the point of integration testing in the first place.

As I said as I tried to end this conversation multiple times before (but for some reason you keep extending it despite your frustration with it in the first place)... do what you want, if you dont want to write an integration test and just want to run it on your server and take the risk, go for it. Hopefully pleorma wont integrate it into the code base without proper tests, but thats on you, its your risk to take. But dont continually imply that me having an interest in integration tests is somehow silly just because you can test it manually.

@tmy

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.