Run time of per-test and shared fixtures

A harness runs 40 test cases against a file parser. Each test needs a temporary directory of sample files: creating it takes 1.5 s and deleting it takes 0.5 s. Each test body takes 0.10 s. Assume the tests leave the sample files unchanged, so sharing the directory requires no restoration between tests. Compute the total run time when the directory is created and deleted around every test, the total run time when one directory is shared by the whole run, and the time saved by sharing. Give each answer in seconds to one decimal place.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Test Harnesses Questions: