function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sridhar sridharsridhar sridhar 

Deploy only test classes

Hi all 
i have to deploy  15 test classes into production.  
among these some are new and few are goint to overwirte the existing test classes. 
what are the steps to follow to deploy?? 

if i go throught he changesets
do i need to validate the test classes before deploy or directly can deploy? 

shall we expect any deployment errors
 
Ankit Maheshwari 2Ankit Maheshwari 2
Hi Sridhar,

All test classes can be deployed by changeset but first you need to do run all test in sandbox  and then see if all triggers and classes has code coverage more than 75% than you can deploye classes.if any class or trigger does not have code coverage then it will create issue. So first check and resolve all the issue and deploye by changset.

Thanks
Ankit Maheshwari
sridhar sridharsridhar sridhar
Hi Ankit .. thaks for reply.. 
there is code coverage issues in production to resolve that only want to deploy modified test classes to increase code coverage...
here i want to deploy only modified test classes into production

is it possibile to deploy only test classes into production using changes sets without controller classes..???????
sridhar sridharsridhar sridhar
Hi guys here is the strigh forward question...

i want to deploy only testclasses from testing sandbox to Production.. i can not deploy controller classes along with test classes why becasues those under development for new features... 


how can i achive this with changesets??????
SaurabhGupta_SaurabhGupta_
You should create a outbound change set and then update it to production. In production go to inbound change set and click on deploy. Select no test class to be executed and it will deploy your code.
Ankit Maheshwari 2Ankit Maheshwari 2
Hello sridhar,

You can deploye only test classes by outbound changset. there is no issue.

Thanks
sridhar sridharsridhar sridhar
I tried to deploy..but it is failed ...due to overall organiation code coverage 45%..
 
Ankit Maheshwari 2Ankit Maheshwari 2
you need to check all triggers either related to your test classes or rest all in producxtion. And find the test class which has less code coverage. Then check with all validation rules and then implement all the scenerios in test class with respect to validation rules. and then deploye again. 
Hope it will work for you.

Check all the validation in production and also check the istalled packages. May be your trigger has stopped the functionality of an installed package so you need to contact app support to resolve this issue.
sridhar sridharsridhar sridhar
Still not get solution guys...
SUNDARAVEL JSUNDARAVEL J
@Sridhar 

You can deploy your modified test classes to Production without its apex class using change set.
Make sure that  you are selecting the Run Specified Tests option and providing the test class name that you modified while deploying.