Since it is very hard for a beginner to code a test case covering all points, I decided to code many test cases. Each test case can cover some coverage points. Combining all the cases into a coverage report, all the coverage points can be hit.

I want to know if it is acceptable in a real work environment?

2

There are 2 answers

0
toolic On

Yes, it is acceptable in a real work environment to create several cases to achieve 100% functional coverage.

Being a beginner has nothing to do with it. Even for experienced engineers, it is common to create multiple tests which are designed for certain scenarios, especially if your system is complex.

Simulators support merging coverage databases from several tests because it is expected that more than one test will be required to achieve high coverage.

0
dave_59 On

Splitting your tests into separate tests is not only acceptable, there are many advantages in doing it that way.

  1. You can parallelize your tests into many concurrently running jobs which means the turnaround time to get results is much quicker.
  2. Each test starts from a fresh unknown state without any dependency on previous tests.
  3. When you find an error in the design or testbench, it's much quicker to get back to the state just before the error happens for debugging.