How is application pool implemented in IIS?


Is each application pool equivalent to a .Net AppDomain?
Or it is a equivalent to a .Net process?
How is Application pool related to IIS w3wp.exe? 



Question: is there a scalaTest mechanism similar to TestNg dependsOnMethods annotation
Answer: Here is a Scala trait that makes all test in the test suite fail, if any test fails.
(Thanks for the suggestion, Jens Schauder (who posted another answer to this question).)

Pros: Simple-to-understand test dependencies.
Cons: Not very customizable.

I use it for my automatic browser tests. If something fails, then usually there's no point in continuing interacting with the GUI since it's in a "messed up" state.

License: Public domain (Creative Common's CC0), or (at your option) the MIT license.

import org.scalatest.{Suite, SuiteMixin}
import scala.util.control.NonFatal


/**
 * If one test fails, then this traits cancels all remaining tests.
 */
trait CancelAllOnFirstFailure extends SuiteMixin {
  self: Suite =&gt;

  private var anyFailure = false

  abstract override def withFixture(test: NoArgTest) {
    if (anyFailure) {
      cancel
    }
    else try {
      super.withFixture(test)
    }
    catch {
      case ex: TestPendingException =&gt;
        throw ex
      case NonFatal(t: Throwable) =&gt;
        anyFailure = true
        throw t
    }
  }
}