+ Start a Discussion
sandeep varma indukurisandeep varma indukuri 

when the code in production can we do unit testing?

hi all
i had a  doubt can a code be tested when it is in production by a developer not the UAT 
Best Answer chosen by sandeep varma indukuri
Andy BoettcherAndy Boettcher
Only as a last resort - NEVER do this normally.....you can use Eclipse/Force.com IDE to edit code directly in production.  You should ALWAYS use best practice of writing code and unit tests in a sandbox environment however!

All Answers

Pramod_SFDCPramod_SFDC
Hi,

I believe, you cannot modify i,e edit the code which is in the production envirornment.Probably you can use the developer console to test the code. If you are talking about the test class, you should write it the Sandbox or Dev Org, rin the test and deploy it to Production.


regards
Pramod
Deepak Kumar ShyoranDeepak Kumar Shyoran
Yes definitely you can run all your test class in Production(Using Developer Console or Run button on Test Class but you can't modify them, if you want any modification then you have to modify the code on sandbox or D.E from where you have created the Package and then deploy those changes to the Production.

Please mark my answer as a best solution to your question if it solves your problem.
Andy BoettcherAndy Boettcher
Only as a last resort - NEVER do this normally.....you can use Eclipse/Force.com IDE to edit code directly in production.  You should ALWAYS use best practice of writing code and unit tests in a sandbox environment however!
This was selected as the best answer