title: Unit Testing in Visual Studio
body: <p>I'm wanting to create a load of unit tests to make sure my stored procedures are working, but i'm failing (i'm new to tests in visual studio).</p>
  
  <p>Basically I want to do the following:</p>
  
  <pre><code>&lt;testclass()&gt;
  Dim myglobalvariable as integer
  
  &lt;testmethod()&gt;
  Public sub test()
      -&gt; use stored procedure to insert a record
      set myglobalvariable = result from the sp
  end sub
  
  
  public sub test2()
      -&gt; use a stored procedure to modify the record we just added
  end sub
  
  public sub test3()
      -&gt; use a stored procedure to delete the record we just added
  end sub
  end class
  </code></pre>
  
  <p>The problem is because the tests don't run sequentially, tests 2 and 3 fail because the global variable isn't set.</p>
  
  <p>Advise? :'(</p>