I have three test cases, say test_1, test_2, and test_3. I have generated functional coverage for each test case individually. when I try to merge the coverage of test_1, test_2, and test_3, the functional coverage was 45%. Then I changed order during merging i.e:- test_3, test_1, and test_2, functional coverage was 65 %.
By changing the order of test cases, during merging the functional coverage got increased.! Could someone explain to me, How functional coverage increased by changing the order of test cases during merging?
Check the log messages carefully, the information there should tell you. Often it's because you're picking one of the tests to provide the resultant model (structure) of the coverage, and the other tests have different models so any non-overlapping items will get dropped from the merge. For example if you have bins 1,2,3,4,5 in your 1st test, and bins 3,4,5,6,7 in your 2nd test, only 3,4,5 from the 2nd test would merge to the resulting merge file.
This does depend on your merge command and any preceding merge_config commands that control how the merge is done; you can do a union, pick a primary run (as described above) or even take an empty model and merge only selected items. Please read the docs, there is a very details guide on coverage merging that explains all of this.
Thanks for your response. I want to take all the non-overlapping bins also. It should not be dropped. For that what I should do.?
Then you need "union" merging. There's a great coverage tutorial here: Merging Coverage using IMC - Rapid Adoption Kit (RAK) and i strongly recommend that you study it. You haven't provided any detail of your current flow / scripts, and there are many factors that would need to be considered before anyone could give you a definitive answer for what command suits your need.
All I did is, I have created a "merge.cmd" file, then I execute "imc -exec merge.cmd". that's it.
I have used "union" in the merge_config command. but I getting the same result. non-overlapping bins are dropping.
I have used is following commands,
2) merge_config test_2 test_1 -resolution union
3) merge test_1 test_2 -out all
I want both functional and code coverage of each test should be merged together without any dropping