[Salesforce]Agentforce VibesでApexテストクラス自動作成

1 Apexクラス作成する。

public with sharing class Sample {
    public Sample() {

    }
}

2 Agentforce Vibesに指示する。

Sampleのユニットテストクラスを作成して

3 手順2で作成された内容コピーする。

@isTest
public class SampleTest {
    
    @isTest
    static void testSampleConstructor() {
        // Arrange & Act
        Sample sample = new Sample();
        
        // Assert
        System.assertNotEquals(null, sample, 'Sample instance should not be null');
    }
}

4 空のApexテストクラスを作成して、手順3でコピーしたコードを貼り付ける。

投稿者: kinkun

保有資格 Salesforce Certified Platform App Builder T Salesforce Certified Platform Developer I Salesforce Certified Platform Developer II Salesforce Certified Administrator

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です