First time script running successful but next time getting error file got corrupted.

  • 4
    Welcome to the site! We'd need more information about your problem, so we can help. Please provide details about the script, and the files. – pavelsaman Oct 21 '19 at 12:30
  • That is good practice to clean up but what could be the reason file got corrupted. – Deven Oct 22 '19 at 3:59
  • We wrote script which reading and writing data from excel. Script running property 3 -4 time but next time excel input data also getting deleted and system throws error message File got corrupted. – Deven Oct 24 '19 at 8:49
  • @Daven We'd still need to actually see the script, we already know you have some script, but we need to see how it looks like. – pavelsaman Oct 24 '19 at 9:53

Start your test with a clean-up. For me it is a best practise to set the state of the environment under test. This might mean deleting some files or database records.

Now it could be a defect, if you expect the same script to be runnable over and over again.

| improve this answer | |
  • And end each test with a cleanup as well, this way you will cover failures at both ends. A cleanup doesn't have to actually clean things up but mainly verify if something is needed – Rsf Oct 22 '19 at 11:10
  • Thanks Niel for your guidance – Deven Oct 24 '19 at 12:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.