function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bdstangbdstang 

Post install script System.Test.testInstall method not available

Developed post install script -- no problem.

However, when I try to add a test script (see below), I get "Method does not exist or incorrect signature: System.Test.testInstall". The testInstall method does not show up in the list of methods available for the Test class in Eclipse IDE, and editing/saving the test class directly in the Salesforce UI results in the same error.

Please advise.

 

@isTest
static void testInstallScript() {
PostInstallClass postinstall = new PostInstallClass();
System.Test.testInstall(postinstall, null);
System.Test.testInstall(postinstall, new Version(1,0), true);
List<Account> a = [Select id, name from Account where name ='Newco'];
System.assertEquals(a.size(), 1, 'Account not found');
}

ryanjuptonryanjupton
Can you please post your post install script?
JimDeLongJimDeLong
Was there a resolution to this? I'm trying to get my post install script test into my testMethod. Is there some sample code to see?