So, the user profiles and objects are actually considered "objects which are used to manage your organization" and they can be accessed without any bad consequences of whether or not your test class/method includes the... annotation
Objects which are accessible in this manner include:
RecordType
ApexTrigger
Organization
ApexComponentfunction credentials(){
this.email = "[email protected]";
this.account = "1234567";
this.role = "25";
this.password = "secretPassword";
}
//Setting up URL
var url = "https://rest.netsuite.com/rest/roles";
//Calling credential function
var cred = new credentials();
//Setting up Headers
var headers = {"User-Agent-x": "SuiteScript-Call",
"Authorization": "NLAuth nlauth_account=" + cred.account + ", nlauth_email=" + cred.email +
", nlauth_signature= " + cred.password + ", nlauth_role=" + cred.role,
"Content-Type": "application/json"};
var response = nlapiRequestURL(url, null, headers);
var results = JSON.parse(response.body);
var domain = results[0].dataCenterURLs.systemDomain;
ApexClass
ApexPage