function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Profile p = [SELECT Id FROM Profile WHERE Name='System Administrator'];
You don't have to create Profile in Test class.
All you need to do is query it from your Org. Refer below example: You can change name('System Administrator') based on requirement. And then you can use profile Id (p.Id) in your test classes.
Hope this will help you.