Too many SOQL queries: 101 issue with Unit Test Methods
By using the Test.startTest() & Test.stopTest() you get 2X governer limits.
In nutshell you have 2 context.
- out side of Test.startTest() & Test.stopTest() and
- inside of Test.startTest() & Test.stopTest().
In both context you get separate limits.
To fix this issue what you will have to do is:
- Optimize and see if you can reduce the queries in trigger
- Reduce the number of objects you are inserting
- You can skip unnecessary trigger execution by checking if trigger being called by Test method
if(Test.isRunningTest())
- in worst case you can use SeeAllData = ture