You need to sign in to do that
Don't have an account?

Problem for test coverage for last week created Activities(Urgent )
We are creating a custom VF page reports that shows last week activities which associated to Accounts.
We are facing problem in getting proper test coverage, because we are fetching the Activities on created date only,
But to coverage this portion of code we have create Activities that are belong to last week in our test class, but the field was non writable in salesforce.
Is their any alter native way to do this .
Thanks in advance.
Add a flag to check if(test.isRunning == True CreatedDate CRITERIAFORTHISWEEK) to the class so that if test is not running it looks at last week and if test isrunning is check for dates in this week