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
DML2020DML2020 

Best practice for validation and deployment

Changes were made to a communities site by adding/ modifying code in .cmp, .js, and .css files in a dev sandbox to replace two components which each point to URL links and adjust their positioning on the page. Now, inbound change sets are to be validated before deployment to FULL sandbox.

Which test option should be selected from Default, Run ALL, LOCAL or SPECIFIED tests based on what was done? 

Best Answer chosen by DML2020
ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

If you have apex classes which are being used on the components on the component then you can go with the specific test classes using RunSpecifiedTests for time saving.

If you do not know which class is being referenced then you can go with the RunLocalTests to run the local test classes without any issues.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

If you have apex classes which are being used on the components on the component then you can go with the specific test classes using RunSpecifiedTests for time saving.

If you do not know which class is being referenced then you can go with the RunLocalTests to run the local test classes without any issues.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
This was selected as the best answer
DML2020DML2020

Thank you.

Two questions then:

1. How to determine which class is being referenced (which apex classes are being used on the component) to Run Specified Tests?
2. If after running the Local Tests Apex Test Failure errors are seen, that appear to be unrelated to the Aura Component Bundle selected for the change set, what is the best practice on handling this?

ShirishaShirisha (Salesforce Developers) 
Hi,

1.If you have list of lightning components then you need to check the code to confirm,if it is using any apex class or not.(Developer should know the details).

If you have Visualforce pages then you can go to the Visualforce page in UI and click on Show dependencies button to see the list of apex classes which are being referenced.

2.If you see any test failures then you would need to fix all the errors then only you will be able to deploy the component/site successfully.

I would suggest you to reach out to your developer for the same to know more details on the apex classes.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri