15

Starting a few days ago my apex class compilation time suddenly ground to a halt. After going into the setup deployment monitoring I was at first delighted with the new deployment monitoring UI, then dismayed when I saw it was running 200+ tests to compile my apex class. Thinking it might be a maven's mate bugs I dug into the bowels and confirmed it's doing the deployment with the following options:

  • checkOnly = false
  • rollbackOnError = true
  • runAllTests = false
  • runTests = []
  • purgeOnDelete = false

Strangely, after canceling the deployment several times it switched back to not running tests when I deployed. Unfortunately the next class I moved to exhibited the same issue, only a different set of tests. Even stranger, it failed out my deploy when an unrelated test failed.

If I'm working on a sandbox, using api version 29 for the deployments, and the v29 metadata api, with deploy options that don't imply any tests should be run, seems like this shouldn't be happening.

I've scoured the spring and winter '14 release notes and couldn't find any mentioned of altered testing behavior (although admittedly it's pretty easy to get lost in them). Is anyone aware of what might be causing this and what options I have to work around them? Seems like the metadata api is ignoring the parameters and instead running all tests the reference a class, but only in certain instances ...

5
  • Is this reproducible or random? Does it happen on just this one sandbox or have you observed it on other sandboxes? We're developing on several sandboxes using Mavens and none of us (6 developers) have observed this behaviour. Commented May 9, 2014 at 9:24
  • Somewhere in between, kind of like the "invalid" file checkboxes, i.e. if a class hasn't had it's test run since the last compilation it does this, it re-runs all other tests, otherwise it runs none. I haven't noticed it recently and this may have been addressed in a patch release. Commented May 12, 2014 at 14:45
  • This still seems to happen randomly, is anyone else experiencing this behavior? Commented Jul 16, 2014 at 3:46
  • Is this still an issue or should it be closed? Commented Jul 23, 2015 at 22:05
  • @CharlesKoppelman i haven't run into it anytime recently, but it's rare that i do deployments to production that don't require running tests (i.e. a page layout) Commented Jul 27, 2015 at 16:13

1 Answer 1

1

I wonder if there is possibly a bug introduced. I was just in a meeting with a couple people from Salesforce and one of the features they described in the new Spring'15 release was that you can do quick deployments.

Essentially, if I understood correctly, you can validate a deployment and it will keep those results for up to 4 days. Then when you are ready to deploy the code, you can deploy it directly without running the tests for a faster deploy time.

I haven't tested this scenario myself or had any issues. But I wanted to let you know that there ARE some changes to the deployment process with the new release.

2
  • yeah, just saw that feature, super excited about it Commented Feb 7, 2015 at 1:51
  • i still see weird test behavior from time to time, mainly with ant deployments to sandboxes with run tests off, that still run tests ... it's fairly infrequent Commented Feb 7, 2015 at 1:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .