0

When we are uploading our huge managed package, it takes up to 3 hours for process to finish and the major part of it are taken by tests execution.

The inconvenience here is that tests failures are not reported on the go (i.e. right when they are discovered), but only at the end of the upload process (i.e. 3 hours later in our case) all at once.

Is there any way to get tests failures dynamically right in the process of tests execution as a part of upload process? Maybe we can query some table or whatever to see currently detected failures.

E.g. when we deploy code using ant migration tool with test execution options, it reports back failures right away after bad test has just been executed. Can we achieve similar affect when it comes to test execution on package upload?

Any suggestions would be appreciated.

1 Answer 1

2

No, the upload process does not provide an interface you can use to monitor, or even abort, the upload. Ideally, you should run all tests manually to verify test failures before attempting to upload. I do recognize that sometimes errors only appear on upload (as opposed to deployment), but there's not much you can do about that at this time.

5
  • 1
    I want to pile on here. In 90+% of test failures, a simple "Run All Tests' from the Dev Console in the packaging org should find them. Commented May 24, 2019 at 17:46
  • @SebastianKessel Far more than 90%, I'd wager. There's just a few edge cases where RAT doesn't behave the same as upload tests, but those are rare.
    – sfdcfox
    Commented May 24, 2019 at 17:57
  • Agreed. I frankly never found one of those and I’ve built over 20 AppExchange packages. Commented May 24, 2019 at 17:59
  • @SebastianKessel running tests from dev console in advance before assembling the package would mean for us +3 more hours to the duration of the whole process. That's why we avoid running all tests on deployment, since they would be forced to executed on package upload anyway. We've already figure out how to interrupt/stop package upload process at any time we need, the only thing here is that we don't want to wait 3 hours to get one single test method failure and re-run the whole process. I.e. it would be better to get that failure ASAP, fix it, and re-run upload.
    – wesaw
    Commented May 25, 2019 at 6:14
  • If you were to run your tests in the console, you’d see the failures immediately. You could then stop the run, or start working on the fix (or both) right then. Then you can upload in the middle of the night, so the 3 hour run doesn’t need to be monitored. Commented May 25, 2019 at 15:01

You must log in to answer this question.

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