Thank you for this , very understandable. But one thing , This was uploaded in 2018 , there has been many changes in testmethods in latest releases . Requesting you to upload a video including latest features. Thank you
Hi Supriya, Even there is any new features came but base is same.It helps you to explore any new change on test class. Soon I try to add more if there is any.
Hi Balaji, Can you let me know what is the difference between testSetup and testDataFactory? It seems that both are used to create dummy data for testing.
Hi Krishna, testSetup is an annotation Use test setup methods (methods that are annotated with @testSetup) to create test records once and then access them in every test method in the test class and it is limited to your test class where you defined testSetup method.Coming to testdatafactory is just a test class which contains reusable methods can be invoked in any other test classes in application for data preparation.
No you can write only one @testSetup method. Please find the below link for more information from salesforce.com. developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_testsetup_using.htm
Excellent, you are a very good teacher, keep it up sir
the examples used are very good and real time scenarios,thank you
Sir your videos are excellent, one request please make video how to integrate salesforce with linkedin
Thanks sir.. superbly explained
well said,,, Please upload more on different concepts..
Simply superb
Thank you for this , very understandable.
But one thing , This was uploaded in 2018 , there has been many changes in testmethods in latest releases . Requesting you to upload a video including latest features.
Thank you
Hi Supriya,
Even there is any new features came but base is same.It helps you to explore any new change on test class.
Soon I try to add more if there is any.
You are pro sir. Thanks for a wonderful information.
THANKYOU FOR THIS USEFUL CONTENT..
Hi Balaji, Can you let me know what is the difference between testSetup and testDataFactory? It seems that both are used to create dummy data for testing.
Hi Krishna,
testSetup is an annotation Use test setup methods (methods that are annotated with @testSetup) to create test records once and then access them in every test method in the test class and it is limited to your test class where you defined testSetup method.Coming to testdatafactory is just a test class which contains reusable methods can be invoked in any other test classes in application for data preparation.
@@salesforcetechbook ok ok. Got it. Thank you
it helped alot! thank you
21 line is typical for beginners
How to do test coverage if I am writing code in visual Studio code
Hi Rahul,
It will be saved into Salesforce you can run in Salesforce or you have option to run test class in vs code as well
I am only getting 40% codecoverage.
Can you please share all the coding notes.
github.com/salesforcetechbook/ExampleCodesofSessions
can you please make an videos on community clouds
swathi kumar Sure Swathi I will do soon
sir can we write 2 @testsetup methods
No you can write only one @testSetup method. Please find the below link for more information from salesforce.com.
developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_testsetup_using.htm