You need to sign in to do that
Don't have an account?
sgm_force
Generating failures in Batch Class processing for code coverage
Hi everyone,
I need to generate failures in the execution of a batch class in order to cover a significant amount of the batch class code.
Any idea on how I can go about this?
Thanks in advance,
SGM
Each test method in your unit test is it's own unique test, meaning, among other things, the database is "reset" as each test method begins. In your unit test, you should be creating the data you will be testing against.
So, assuming you are doing this, it shouldn't be too difficult to create "bad" data or, at least, data designed to try to break your code.
Will it be possible for you to give me some example....What are the different scenarios in which I can cause a batch failure?
Thanks.