title: How to run library tests and doc tests but not integration tests
body: <p>Is it possible to use the <code>cargo</code> command to run library tests (i.e.., <code>cargo test --lib</code>) and documentation tests <em>without</em> running any integration tests (i.e., the tests in the crate's top-level <code>tests</code> directory)? Bonus points are awarded for compiling the integration tests without running them.</p>
  
  <p>Here's the bigger picture. My crate is a client library for a web service, and the HTTP server is not part of the crate. I've organized my crate into:</p>
  
  <ol>
  <li>Library tests, which do <em>not</em> depend on the HTTP server,</li>
  <li>Documentation tests, which do <em>not</em> depend on the HTTP server, and</li>
  <li>Integration tests, which require the HTTP server to be running on the localhost.</li>
  </ol>
  
  <p>As such, it's sometimes unfeasible to have the HTTP server running on the machine building the crate—e.g., a Travis CI build agent. In these situations I would like to build all tests but exclude all integration tests from running because every integration test will fail.</p>