0 Replies Latest reply: Apr 11, 2007 7:45 PM by 800340 RSS

    JUNIT: how to desgin this test so there would be one INSERT to db?

    800340
      Hi there,

      How should I design this test:
      I would like to upload a files system and do INSERT to the db. once I have the info in the db I would like to READ it and check against some other files.

      so I have something like this:
      doInsert();
      doRead();
      test1();
      test2();
      test3()...;
      problem that I have is the doInsert. this takes ~ 50 seconds and once it has been executed I wish to delete it ONLY in the last test.

      currently (and unfortunately) I have this:
      doInsert()
      read()
      doTest1();
      delete();
       
      doInsert()
      read()
      doTest3();
      delete();
       
      doInsert()
      read()
      doTest2();
      delete();
      can anyone advise how to do once time insert and one time delete?
      thank you