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!][1]" 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][2] 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][6] 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][3] by Marco Cecconi (@[Sklivvz][3]) 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 [HackerNews][4] where SE's [Jason Punyon][5] 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.


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

> This one, right here. :)


  [1]: https://www.reddit.com/r/sysadmin/comments/2zd9lz/we_keep_stack_exchange_stack_overflow_server/
  [2]: http://stackexchange.com/users/7598/nick-craver
  [3]: http://stackexchange.com/users/4623/sklivvz
  [4]: https://news.ycombinator.com/item?id=7052835
  [5]: http://stackexchange.com/users/4188/jason-punyon
  [6]: http://stackexchange.com/users/2/geoff-dalgas
  [7]: http://stackexchange.com/users/2815887/haney