I'm using Salesforce Survey for one of the requirements. I would like to write a trigger on SurveyResponse object. I've written the trigger and apply the logic that I need.
Now, I'm trying to write a test method of that trigger and as part of the test method, I'm trying to insert SurveyResponse as test setup. When I write insert DML statement, I receive an error that SurveyResponse is not writable.
Now, How would I write a test class for a sObject which is not writable but salesforce allow to write trigger code on that object?
One option in my mind is to put SeeAllData = true but this is something which I'm not preferring. Is there any better solution for this problem?