3

I've written several simple Apex unit tests and I'm trying to run them through Salesforce, so:

Setup > Develop > Apex Test Execution > Select Test... > Run

The tests are passing, the code is fine.

But quite regularly I'm finding the tests just don't run at all. I select a test and hit run and all I get is the Queued icon next to my test and the following message when I click on the test:

Selected job is not yet complete.

Sometimes the test kicks off after a few minutes and sometimes it's up to an hour or more and once the test starts it only takes a few seconds to complete.

It must be a problem with Salesforce.

Has anyone else encountered this and is there a solution?

8
  • There is a limit on test runs or APIs. Have you checked that? Apr 24, 2015 at 16:39
  • Maximum number of test classes that can be queued per 24-hour period (production organizations other than Developer Edition)5 The greater of 500 or 10 multiplied by the number of test classes in the organization Apr 24, 2015 at 16:42
  • Maximum number of test classes that can be queued per 24-hour period (sandbox and Developer Edition organizations)5 The greater of 500 or 20 multiplied by the number of test classes in the organization Apr 24, 2015 at 16:42
  • 1
    I recommend adding some System.debug() statements to your code so you can use the log files to see what parts of the code are running.
    – Jagular
    Apr 24, 2015 at 16:48
  • 1
    I've got similiar problem (EU region). Tests were queued forever and it wasn't related to complexity of test. I also tried running tests from developer console with no luck. I suggest you using MavensMate. I am using it and it runs tests considerably faster. MM is using API to run test and they aren't queued at all.
    – mischczu
    Apr 24, 2015 at 19:25

1 Answer 1

3

I've got similiar problem (EU region). Tests were queued forever and it wasn't related to complexity of test. I also tried running tests from developer console with no luck. I suggest you using MavensMate. I am using it and it runs tests considerably faster. MM is using API to run test and they aren't queued at all

This site is temporarily in read-only mode and not accepting new answers.

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