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
raz rraz r 

ischatbotsession filed not visible in chat transcript

ischatbotsession filed not visible in chat transcript  in test class .How to make ischatbotsession as true
AnudeepAnudeep (Salesforce Developers) 
The ischatbotsession field is not writeable as far as I know and is only available for use in SOQL or some reports
 
raz rraz r
yes @Anudeep, I have included the condition like ischatbotsession=true in soql query in main class, now I want to cover this test class becoz, due to this test class codecoverage is faliing to 60%. Please suggest.Thanks !!
AnudeepAnudeep (Salesforce Developers) 
Guess you have to go with the workaround of using Test.isRunningTest() 

This method usually comes in handy, when you intend to conditionally restrict execution of certain Apex code blocks, based on whether they are being invoked from a test class or not
 
if(Test.isRunningTest()){
}
else{
}