User Antony Naveen has been asking questions to review his Selenium code.

Example questions:

One of these questions was put on hold as unclear what you are asking.

As SE has codereview.SE I would like to welcome questions like this, because its a way to learn both ways. Thinking about how I would solve this is pretty interesting and valuable to a larger audience to learn from our train of thoughts.

Maybe we should think about a format so that these questions are clear as code reviews.

How should I edit them so that the question is acceptable?

  • Title
  • Question
  • Code example
  • Tags to add

Or if they aren't salvageable for our site, what should be done with them?

  • I agree 100%. I think the code review questions offer far more for the next visitor than the 'Please fix my XPath' questions.
    – Paul Muir
    Oct 6, 2016 at 11:46
  • @PaulMuir Hmm, can you please explain why you think code-review questions give added value to future visitors. See my comment on corsiKa's answer, it might only help the asker. Oct 6, 2016 at 11:55
  • Well the code review questions is generally more about basic principles and less about having an edge case that is specific solely to the person asking the question. By having answers about principles of QA and not about the 1000's of edge cases, it is far more useful for other users.
    – Paul Muir
    Oct 6, 2016 at 11:57
  • Code reviews add limited value for someone searching for a problem of their code quality. But they add a lot of value to regular users who will review the question (and answers) as they will learn how to make their own code better after seeing the reviews. If they didn't, Code Review SE wouldn't have barely any long term value. So CRs in general are great for current visitors, but they do little to bring people in.
    – corsiKa Mod
    Oct 28, 2016 at 15:47
  • @PaulMuir cont. That being said, I agree that they add a lot more than the xpath questions. What are the odds that someone is going to need that exact xpath? Probably not toooo much beyond a few common mistakes.
    – corsiKa Mod
    Oct 28, 2016 at 15:48

3 Answers 3


I have a couple uncollected thoughts on it. I'd certainly welcome others to jump in with their own:

  • While Code Review Stack Exchange exists, it is an experiment by the Network. (As are Puzzling and Code Golf.) I would not necessarily say that because it exists, we should welcome questions of the sort. Of course, at the same time, I would not say that we shouldn't welcome them either. Simply that CRSE's existence doesn't factor into the decision.
  • We as a community get to decide what we want to allow and not allow (barring an explicit elbow from the sky, and I really don't think Shog or Robert are planning to do that to a community that is trying to grow.) It's exactly posts like this that allow us to get the ball rolling on standardizing such posts, so thank you!
  • One of the reasons CRSE is considered an experiment is that most sites take into consideration how helpful a question/answer pairing is going to be for future visitors. Historically, this site has followed the trend of other sites which is that questions should continue to be very helpful to future visitors. Code review questions are generally not as useful to future visitors.
  • Titles should focus on what the real problem is. We don't want a code dump and ask it to be reviewed. The question should have clearly defined parameters: I'm trying to FOO. Inputs are BAR and BAZ. Outputs are BAQ.
  • We should follow the wisdom of CRSE in that requests for Code Review should be functional already. Don't ask us to just fix broken code.
  • At CRSE, you're generally not allowed to say "I'm looking for help with X specifically - so if you see things about Y in my code, don't bother saying anything about it." You have to take the entire review. I think if we're going to allow this, we should follow that as well. One of the major reasons for this is that it helps future visitors the most, and I really don't think we should lose sight of that aspect of our mission.
  • We should expect askers to indicate why they feel the code needs to be reviewed. Even though we don't let them X/Y the review and everything is on the table, it would be good if we knew why they felt it needed a second set of eyes in the first place.
  • Categorically deny a dump of purely code. I'd venture to say that as a rule of thumb, there should be more text than code.
  • I feel a code-review tag would be a meta tag and that we shouldn't use it. But at the same time, it makes me wonder if maybe it is okay to do so - it would be appropriate to the content, at least, and it would be no more meta than other sites that use story-identification tags.

Those are what come off the top of my head. I'll be adding to this more if I get a chance, but I strongly encourage other answers. I think this is an important topic for us to discuss and don't want anyone to be like "corsiKa has spoken! Our input is no longer needed on the matter." Besides, with this stupid blue gravitar (instead of my old, AWESOME purple one...) who can take me seriously anymore?

  • Goodpoint about CR.SE being beta/experiment. As I just listened the StackoverFlow podcast yesterday I came to the insight that we are not just helping the actual user who asked the question, but the thousands that find the question on Google and use the answers. CodeReviews add limited value to future visits like you already suggest in one of your points. Oct 4, 2016 at 15:46

I am all for helping people, but SE has a variety of software-related sites so that they can specialize.

When a novice Selenium Webdriver user comes here with a question about how to write Java code, we tend to send them elsewhere because the question isn't about testing. Yes, test automation usually involves programming, but this site specializes in those aspects of testing that do not overlap with general programming. Otherwise we end up accepting any question that might appear in Stack Overflow.

A similar argument holds for code reviews.

I also worry about an onslaught of code review requests from students seeking homework help. We get enough of that kind of thing already.

  • 1
    What about migrating questions like this to the codereview.SE? Oct 31, 2016 at 8:00
  • Not agreeing or disagreeing, but we should not consider other SE sites when determining what is or isn't on topic here. Having a place for a question to go shouldn't make us less likely to reject it in favor of that other site, and having no place for it to go shouldn't make us more likely to accept it either.
    – corsiKa Mod
    Nov 1, 2016 at 21:59
  • In that case, I guess it comes down to whether we think the questions will be useful and whether they will drive more traffic to the site. Anything else?
    – user246
    Nov 2, 2016 at 13:03

To me, I feel like we are pushing some of the better questions and answers away from the site purely because it doesn't fit the exact mold or because another SE can answer it.

By accepting code review questions we are allowing answers to contain information that is pertinent to future users regarding principles and techniques and not solely about fixing their small one-off problem.

Could we start doing this with all questions? Probably, yes. But if we start critiquing all code posted here it will likely push away more users than it would help.

Code Review Questions are popular

Look at the stats on them. Most of the code review questions have at least one solid answer, they have mainly been upvoted and they have a higher view count than a lot of the questions.

Code Review Questions helps future users

They are about principles, specific to QA Development. These are transferable skills regardless of what the next user is attempting to accomplish these questions will help them.

Should all CR questions be accepted?

No, we should have guidelines. If you're wanting specifics to your code quality that should be migrated to CR.SE. But if the question is about POM, BDD, TDD, Design Structures specific to QA or other areas specific to QA than those, in my opinion, should be accepted.

At the end of the day, we are turning down what is in my eyes a valuable resource for future users. The main question I have is why? What harm would come from leaving these questions open?

  • I don't follow the argument that code review questions help future users. Do you believe it will be common for someone seeking help with a testing problem to search for code review questions or read code review questions and answers?
    – user246
    Oct 31, 2016 at 13:07
  • Based on views currently they are some of the higher viewed items (One is #2 for the week). I believe that future users will find more use from answers that provide details about principles. If we are going to close based solely on the lack of ability for questions to be used in the future than we should leave these open and close the questions about XPath.
    – Paul Muir
    Oct 31, 2016 at 13:12
  • It sounds like you've spent more time analyzing site traffic than I have. Would you mind pointing me to evidence that XPath questions do not help future users?
    – user246
    Oct 31, 2016 at 13:24
  • One of the highest rated (using Viewcount/Votes) questions regarding XPath is: sqa.stackexchange.com/questions/14678/… with only 4 upvotes. They are specific to the particular user as it's typically answered with a minor fix to their XPath.
    – Paul Muir
    Oct 31, 2016 at 13:41
  • You mentioned how code review questions get a lot of views, and the XPath question doesn't get a lot of upvotes. Is there a strong correlation between upvotes and views?
    – user246
    Oct 31, 2016 at 13:55
  • Well upvotes is the best way to determine if an answer is useful. Typically speaking answers regarding principles and views tend to be more highly upvoted (IE, Should QA do xyz, How to implement xyz). There is no strong correlation between the two but to determine which is most helpful to the most users, this would be the metrics I would think are best to use.
    – Paul Muir
    Oct 31, 2016 at 14:01
  • 1
    Ultimately, I think we should at least test this and see how it works out. Let's create a tag particular to Page Object Model Review, potentially seed with a few questions and see how the results work out. If it goes well and we have the data to back it as useful then we know that the questions are useful. If not, we can always revert back without any problems.
    – Paul Muir
    Oct 31, 2016 at 14:11
  • That sounds reasonable.
    – user246
    Oct 31, 2016 at 14:14
  • I seeded a question under the test-review tag. I intentionally included issues within the code so that there would (hopefully) be some comments and answers regarding it. It can be found here: sqa.stackexchange.com/questions/23402/…
    – Paul Muir
    Oct 31, 2016 at 15:21

You must log in to answer this question.

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