Skip to main content
14 events
when toggle format what by license comment
Feb 14, 2013 at 23:57 comment added Peter Knolle The end time isn't available in the GUI, but you should be able to see the duration from the Apex Test Execution screen. If you don't see it when you click the View Test History link, you can create a new list view that includes the Duration. Also, you can see durations when running tests in the developer console. Lastly, and most unwieldy, you could see the start and end times in the log. Best of luck to you!
Feb 14, 2013 at 20:40 comment added Sathya Also @Peter can you please answer this? When I do the run all tests, even without running in parallel, it just shows the start time but not the end time. Any Idea how to see the end time / duration taken for the run all tests? Previously it was easier when it was showing everything in a single page, now even the run all test is in Apex Test Execution, we are unable to find the end time / duration of run all tests.
Feb 14, 2013 at 19:49 comment added Sathya oh thanks @Peter will try it out and let you if there is any luck!! Thanks again
Feb 14, 2013 at 19:44 comment added Peter Knolle You can create them pretty much like any other record. I usually do the following: Your_Settings__c settings = Your__c.getOrgDefaults(); if (settings.Id == null) { settings.Your_Field__c = 'xyz'; insert settings; }
Feb 14, 2013 at 19:35 comment added Sathya oh ok @peter. I didnt know that. I have about some 100,000 records in my custom objects.. Will I be able to create custom settings from test methods? am not aware of that? If you have any links explaining that, can you please share it with me or post some sample code?
Feb 14, 2013 at 2:58 comment added Peter Knolle @Sathya - Using SeeAllData=true on all of the tests could increase times, because instead of just processing the data inserted for the test they'd be processing org data. You can create Custom Settings in tests and you can access Users even without SeeAllData=true
Feb 13, 2013 at 23:13 comment added Sathya I have enabled SeeAllData=true, should that be one of the problems for the test runs getting delayed? I did that because i had to query the custom settings and user object.
Feb 13, 2013 at 19:00 comment added Sathya Oh okay @Peter.. There is no other option right? One more question? When I do the run all tests, even without running in parallel, it just shows the start time but not the end time. Any Idea how to see the end time / duration taken for the run all tests? Previously it was easier when it was showing everything in a single page, now even the run all test is in Apex Test Execution, we are unable to find the end time / duration of run all tests.
Feb 13, 2013 at 2:19 history edited Peter Knolle CC BY-SA 3.0
added some suggestions for performance of unit tests
Feb 13, 2013 at 1:48 comment added Peter Knolle No. I didn't mean you could ignore validation...just don't need to do a validate only deploy followed by the actual deploy.
Feb 13, 2013 at 1:39 comment added Sathya yeah initially I was doing like that, but even then while deploying it validates as you say. I am not sure how we can ignore validation while deploying (if we have already validated). Please let me know if there is a way. I am using changeset validation and deployment btw, and not eclipse. Also recently I did a project which involved complete custom coding with Partner portal, sites, etc. so I had to write a lot of test methods (say 400) for each page which boomed up the deployment time to 1.5 to 2 hrs from 10 mins. So my lead has asked me to optimize test methods. not sure what to tell them?!
Feb 13, 2013 at 1:28 history edited Peter Knolle CC BY-SA 3.0
added some more information.
Feb 12, 2013 at 22:46 comment added Sathya Hi @Peter, thanks for your response. I did a run all tests using apex test execution. yes its parallel. Any ideas why on each run its taking different execution times? For ex:- 1st time i ran all tests it took 14 mins, 2nd time it was 28 mins, 3rd time it was 18 mins. Am not sure why is it behaving weird like this. And thanks for your suggestion of having longer deploy time than reducing the coverage. I wasnt sure of a better approach. Thats y I was doing it.How long can we wait max for deployment bcoz sometimes mine goes for 2 hours even while validating? I will disable parallel meanwhile
Feb 12, 2013 at 22:28 history answered Peter Knolle CC BY-SA 3.0