2

I have built two simple triggers, both of which cannot be deployed to production as they fail for a bad test class that has some broken SOQL in it.

My current thoughts are to just delete the bad test class from production so these triggers will pass and deploy. I plan to use Eclipse to do this. Any thoughts or previous experiences?

Thank you for the link on how to delete classes, however I am really interested in the community's experience with bad test classes.

Thanks!

Steel Reserve 211
  • 1,078
  • 21
  • 44
  • 4
    http://salesforce.stackexchange.com/questions/5776/deleting-triggers-classes-from-production/5777#5777 – Mohith Shrivastava Nov 26 '15 at 00:20
  • 1
    Seems duplicate of above – Mohith Shrivastava Nov 26 '15 at 00:21
  • @MohithShrivastava Thanks for providing that, I am curious tho as to people's experience with bad test classes. – Steel Reserve 211 Nov 26 '15 at 00:23
  • 1
    I don't think this is a duplicate. I think Mercury is asking whether this is good or bad practice in itself, rather than how to do it. – Nick C Nov 26 '15 at 00:47
  • 1
    I could rant and rave about 'bad' test classes. The rants would mostly be along the lines of "fix the d--n'd test classes" to improve test coverage and to enhance the regression suite with asserts. I've seen too many times when colleagues simply comment out all the lines or huge swaths of lines within testmethods just to get a deployment done – cropredy Nov 26 '15 at 00:47
  • 1
    @Mercury86 while this is a worthwhile topic to discuss, unfortunately StackExchange is not really meant to be a discussion forum. Questions should be pointed at a specific solvable discrete problem. While this may seem horribly pedantic and nit-picky, it is actually the format that differentiates StackExchange from other forums. Please read the help topic on how to ask questions for more specifics: http://salesforce.stackexchange.com/help/how-to-ask – pchittum Nov 26 '15 at 00:48
  • 1
    One way you could modify your question to fit the format of SFSE might be to actually go into some details of the specific problem you are encountering to see whether performing the deletion would fit best practices. "Broken SOQL" as you put it could be the fault of the test class...but could the the fault of the class this is being tested being modified...or could be the fault of other potential changes in your org...so it is hard to generalize in this case what a "best practice" might be. Or whether deleting the test will help. – pchittum Nov 26 '15 at 00:52
  • 1
    @Peter Completely understand, I will refrain in the future from asking these open ended discussiony questions. – Steel Reserve 211 Nov 26 '15 at 00:57

0 Answers0