5

Here you can find details about the software and hardware on which the site is built.

I am wondering do developers write any automation tests (unit/functional/scenario) and what kind of tools/libraries are using?

More specifically, how they are testing their T-SQL objects (functions, procedures, schemas).

4
  • 5
    This one, right here. :)
    – Haney StaffMod
    Aug 17, 2015 at 14:21
  • 1
    Apart from what I have posted in my answer below, I also found a Jeff Atwood's blog post What Was Stack Overflow Built With? where he mentions about "data access layer - LINQ to SQL". I have never worked on .NET platform, so I avoided adding it to my answer. But you do have SQL Server knowledge (as per ur SO Profile). What is the LINQ to SQL used for? Can it be used for "testing T-SQL objects (functions, procedures, schemas)"? Aug 17, 2015 at 21:46
  • 1
    And, there is also a MiniProfiler which is designed by the team at Stack Overflow. It is in production use there and on the Stack Exchange family of sites. I am not familiar with "MiniProfiler" either. So, do you think "LINQ to SQL" and "MiniProfiler" can be useful to add into my answer. Aug 17, 2015 at 22:20
  • Also found Dapper which is in production use at StackOverflow. Oct 7, 2015 at 13:09

2 Answers 2

11
+100

It's really hard to find what tools, libraries, automated testing, etc. are used by SE's team. Nothing has been posted officially on SE's main site. But, I did found few interesting posts, and a video that I would like to share here which covers few of the OP's question.

Reddit's 40-page long post "We keep Stack Exchange / Stack Overflow / Server Fault running - Ask us anything!" is by far the best post I ever read and all the comments/replies are given by SE's team members.

Here is what Nick Craver said on Reddit user "andygrunwald" question:

How does your QA stack look like? Unit and integration tests plus User acceptance tests with selenium / BDD?

Teams differ here on testing. The Careers team actually runs unit tests for example, where Core does not. They used to run Selenium as well, but that was dropped a while ago as not being worth it to maintain. It's a running joke that if you really love TDD, you likely wouldn't be happy on the Core team :)

Here is what Geoff Dalgas says about "Our production build performs the following tasks:"

  • Compiles the code including minification of JS and stops if there are any build failures

  • Copies the new assemblies to two of our servers, these run our meta sites meta.stackexchange and meta.stackoverflow

  • Each server is removed from our load balancer one at a time which is controlled via haproxy.

  • Haproxy will ping each server as they come up to warm them and only put them back in rotation when they return a 200 response code.

  • After we have confirmed our new features are working on our meta tier we will then deploy to the rest of our network, including Stack Overflow.

  • We have monitor for our exceptions and follow a very important rule: A B C D E F (Always Be Checking after a Deploy for Exceptions or you're FIRED)

Video presentation of The architecture of StackOverflow by Marco Cecconi (@Sklivvz) at Developer Conference 2013 also talks about "tests" where he says: (extracted few quotes - listen to talk between 9:15 - 11:20 for more)

We don't have many tests. I'm not advocating that you shouldn't put in tests. [The reason we can get away with this] is that we have a great community. So instead of having automated test we have automated human tests.

The same video was posted on Y Combinator's HackerNews website where SE's Jason Punyon posted the below comment:

It's not that no one follows the norms or tests. On the Careers team we do much more automated testing because there's money and literally people's jobs at stake. We have unit tests, integration tests and UI tests that all run on every push. All the tests must succeed before a production build run is even possible.

There is also a comment on 'bug reports' from Sklivvz:

Remember that our community writes bug reports but also vets bug reports. We rarely have to deal with bad reports. Interestingly, large quantities of false negatives are a non-issue.

And, finally David Haney's comment about Meta.SE posted under the OP's question:

This one, right here. :)

9
  • 3
    Nice compilation. On this one your time researching wasn't wasted for nothing. :-) Aug 17, 2015 at 20:34
  • @ShadowWizard found couple of more resources (added to post). Also, please see comments under the OP's post. Aug 20, 2015 at 20:31
  • Nicely done, can't give more votes though. Oh wait.. Aug 20, 2015 at 20:32
  • @ShadowWizard I am still digging sources on the net. It's hard to find and really time consuming. What no 'more' up-vote? I'm sad. Gimme a 'Bounty' then ;) Aug 20, 2015 at 20:37
  • @ShadowWizard only 100? ;) wink Aug 20, 2015 at 21:10
  • 3
    You really don't have to keep digging, you've already done way beyond anyone ever expected from a non-SE employee to do. Still, what you done deserves at least 10 more votes, so in 48 hours they are yours. ;) Aug 20, 2015 at 21:11
  • 2
    @ᔕᖺᘎᕊ hey, don't give him ideas! :D Aug 20, 2015 at 21:11
  • @ShadowWizard Thank you. Appreciated! ᔕᖺᘎᕊ you just won a bounty from me and Sha's bounty refilling my reps. Aug 20, 2015 at 21:13
  • 1
    lol that is true... now, following the pattern, I need to give @Sha 200... maybe when I get 10.2k? ;) Aug 20, 2015 at 21:17
4

There are no automated tools for testing.

From what I learned over the years, this is the life cycle of a major change:

  1. Write the code and deploy on the development site https://dev.stackoverflow.com
  2. Basic testing by the developers and probably more team members.
  3. Deploy the change here, on MSE.
  4. Collect bug reports, feature requests, and feedback about the new feature.
  5. Fix bugs while it's deployed on MSE, improve, change, etc.
  6. Deploy network wide, if there are no red lights blinking.
  7. Happy dance. (possibly while wearing unicorn masks)

Good example is the recent major change: Let’s improve our site navigation

7
  • You forgot unittests on purpose or do you really believe those aren't in-place as well?
    – rene
    Aug 17, 2015 at 18:15
  • 1
    @rene right, they have unit test called nicael, Gilles, Shadow Wizard, an Unicorn, some weird figure, and I know I'm forgetting someone, but it shouldn't be important, if I can't remember it.
    – Braiam
    Aug 17, 2015 at 18:35
  • @rene I am pretty sure I saw a dev (probably Nick) mention they do not have unit tests, but since I might be wrong I'll try search for this. Aug 17, 2015 at 18:53
  • @ShadowWizard It's a kind of strange for me that they are not have any unit tests as testing functionalities are part of any famous framework (like ruby on rails for example) and SO is something like always following best practices for me.
    – gotqn
    Aug 21, 2015 at 5:48
  • @gotqn well, surely they gave it some thought and have good reasons. Aug 21, 2015 at 6:06
  • @ShadowWizard "bounty in 48 hours"... what timezone the Israel clock is set? wait is too long... :) Aug 24, 2015 at 18:37
  • 1
    whoops, totally forgot @Hack! Fixed now. ;-) Aug 24, 2015 at 18:47

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