6

I just noticed that there is a tag called code-coverage. I'm not a big fan of this tag since it seems to encourage "do my homework" questions. I'd prefer a tag called testing or some such idea. I think it just comes down to a pet peeve of mine: I just hate when people are only looking for 75% coverage. Use assertions people!

I'm editing the tag wiki to try and promote proper use. How else can we guide proper questions?

3 Answers 3

7

There might be a legit use-case for this.

One of our apps ties into the new communities stuff, which if enabled adds a field called NetworkId to a bunch of objects, such as Chatter Groups. If the feature isn't enabled, then the field doesn't exist, so I've had to make all the code dynamic and able to deal with it.

The issue I've got now is that on orgs where the feature isn't enabled I can't test that code and so lose out code coverage as a result!

All that aside, the number of legit cases to "write my tests for me because I ripped this code off" cases is likely to be small at best. Maybe some wording along the lines of the following will help.

"This tag is not intended for use when code coverage is simply lacking, but for scenarios where because of a particular configuration or system issue code coverage is challenging."

7

Vote offending questions down remorselessly? ;-)

3

I think its important to have a tag that explicitly calls attention to code testing in the context of how do I increase coverage by... "Making calls to test invalid inputs without crashing my test class?", "design my class so that it tests all the if - else branches?", "generate data to test lines that catch exceptions without crashing the test class?", or "how do I get test coverage when invoking web services?", etc.

It sounds to me as though your issue is how to convey this through the meta-tag description so that it doesn't garner "do my work" questions? I can completely understand that perspective. Although I can't say how others use this site, it seems to me that meta-tags are often more of an afterthought than they are where someone begins when creating their posts. As for myself, I may have a few in mind, but tend to leave applying them until I'm finished creating a post.

People come here for a reason; because they have a problem they're looking for help with. Because humor is often lost in the written word, I want to be clear that I make the following statement with no intent to be disrespectful or dismissive of your Question Daniel. I simply don't believe we get many questions that result from someone finding a meta-tag then saying, "Oh, I should ask this question about this tag!" ;)

I genuinely applaud your efforts to clarify the use of this particular meta-tag. I'm encouraged to see that others care about creating community and are taking ownership of a place like this in a tiny corner of cyberspace. :) I've not seen that kind of community since I left CompuServe about a year after the AOL takeover destroyed the communities I'd been a part of that existed there (we're talking over 12 years ago).

To get back on topic... I strongly suspect the people who tend to be the caretakers of this forum are the ones who generally apply the appropriate meta-tags to posts more frequently than the members who use this place. There are many other meta-tags that clearly could benefit from having wiki tags written for them too. I look forward to the day those get written as well. :)

I think LaceySnr's suggested edit takes things somewhat in the right direction, yet it also "feels" a bit too limiting. At the same time, I have nothing better to suggest at this particular moment. Perhaps it's a matter of style. ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .